According to the syntax diagram in the documenation, I can write

COPY table TO STDOUT WITH BINARY OIDS;

Shouldn't the "binary", being an adjective, be attached to something?

-- 
Peter Eisentraut   peter_e@gmx.net


Tue, 15 Oct 2002 20:54:16 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
COPY syntax
Peter Eisentraut wrote:
> According to the syntax diagram in the documenation, I can write
> 
> COPY table TO STDOUT WITH BINARY OIDS;
> 
> Shouldn't the "binary", being an adjective, be attached to something?

Uh, it is attached to WITH?

Seriously, yea, it doesn't read well, but it follows the WITH format of
parameters to a command. 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 15 Oct 2002 21:09:05 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: COPY syntax
Bruce Momjian writes:

> > According to the syntax diagram in the documenation, I can write
> >
> > COPY table TO STDOUT WITH BINARY OIDS;
> >
> > Shouldn't the "binary", being an adjective, be attached to something?
>
> Uh, it is attached to WITH?

Attached to a noun phrase, like "mode" or "output".  Note that all the
other things the typically follow WITH in any command are nouns.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 17 Oct 2002 00:12:08 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: COPY syntax
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > > According to the syntax diagram in the documenation, I can write
> > >
> > > COPY table TO STDOUT WITH BINARY OIDS;
> > >
> > > Shouldn't the "binary", being an adjective, be attached to something?
> >
> > Uh, it is attached to WITH?
> 
> Attached to a noun phrase, like "mode" or "output".  Note that all the
> other things the typically follow WITH in any command are nouns.

Should we add an optional MODE after BINARY?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 16 Oct 2002 18:25:44 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: COPY syntax
Bruce Momjian writes:
 > Peter Eisentraut wrote:
 > > Bruce Momjian writes:
 > > > > COPY table TO STDOUT WITH BINARY OIDS;
 > > > > Shouldn't the "binary", being an adjective, be attached to something?
 > > > Uh, it is attached to WITH?
 > > Attached to a noun phrase, like "mode" or "output".  Note that all the
 > > other things the typically follow WITH in any command are nouns.
 > Should we add an optional MODE after BINARY?

Are you serious? You'd like to mess up the COPY syntax even further
for a purely grammatical reason!

A good few months ago I put formward an idea to change (well migrate
really) to "COPY TABLE" rather than "COPY" - this would allow a well
designed and thoughtout syntax for the new version while retaining old
compatibility.

egards, Lee Kindness.

Thu, 17 Oct 2002 09:33:54 +0100
Lee Kindness <lkindness@csl.co.uk>
Re: COPY syntax
Lee Kindness wrote:
> Bruce Momjian writes:
>  > Peter Eisentraut wrote:
>  > > Bruce Momjian writes:
>  > > > > COPY table TO STDOUT WITH BINARY OIDS;
>  > > > > Shouldn't the "binary", being an adjective, be attached to something?
>  > > > Uh, it is attached to WITH?
>  > > Attached to a noun phrase, like "mode" or "output".  Note that all the
>  > > other things the typically follow WITH in any command are nouns.
>  > Should we add an optional MODE after BINARY?
> 
> Are you serious? You'd like to mess up the COPY syntax even further
> for a purely grammatical reason!
> 
> A good few months ago I put formward an idea to change (well migrate
> really) to "COPY TABLE" rather than "COPY" - this would allow a well
> designed and thoughtout syntax for the new version while retaining old
> compatibility.

I don't like the added MODE either, but Peter doesn't seem to like
BINARY alone, though it seems fine to me.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Thu, 17 Oct 2002 14:57:12 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: COPY syntax
Lee Kindness writes:

> Are you serious? You'd like to mess up the COPY syntax even further
> for a purely grammatical reason!

We already "messed up" the COPY syntax in this release to achieve better
user friendliness.  I do not think it's unreasonable to review this goal
from a variety of angles.

> A good few months ago I put formward an idea to change (well migrate
> really) to "COPY TABLE" rather than "COPY" - this would allow a well
> designed and thoughtout syntax for the new version while retaining old
> compatibility.

Well, I am the first to agree that the current syntax is not well
designed, but I must admit that I don't quite see what benefit simply
adding "TABLE" would have.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 17 Oct 2002 21:17:27 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: COPY syntax
Peter Eisentraut <peter_e@gmx.net> writes:
> Well, I am the first to agree that the current syntax is not well
> designed, but I must admit that I don't quite see what benefit simply
> adding "TABLE" would have.

I think the idea was that "COPY TABLE ..." could have a new clean syntax
without the warts of the current syntax.  TABLE wouldn't be a noise word,
but a trigger for a different syntax for what follows.

However, COPY's feature set is inherently pretty wart-y.  Even if we had
a green field to design syntax in, where exactly is the improvement
going to come, assuming that functionality has to stay the same?

			regards, tom lane

Thu, 17 Oct 2002 23:16:40 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: COPY syntax 