Re: BUG #7836: COPY command does not honor 'FORMAT' option

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: depesz(at)depesz(dot)com
Cc: kurt(dot)lidl(at)cello(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7836: COPY command does not honor 'FORMAT' option
Date: 2013-01-29 21:46:32
Message-ID: CAMkU=1xYRrQDh=Mj455BzFvn+j25J-XVtUFsEua29iSpQLVZvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 29, 2013 at 12:19 PM, hubert depesz lubaczewski
<depesz(at)depesz(dot)com> wrote:
> On Tue, Jan 29, 2013 at 06:20:05PM +0000, kurt(dot)lidl(at)cello(dot)com wrote:
>> template1=# copy pg_aggregate to '/tmp/agg.bin' with format binary;
>
> correct syntax:
>
> copy pg_aggregate to '/tmp/agg.bin' with (format 'binary');

I was just about to call this confirmed before seeing your email.

I figured out the need for the parenthesis by reading the docs. The
need to also quote 'binary' really took me by surprise, especially as
the other two formats don't need to be quoted. I assume the reason
for this is the level of reservedness of the various words in bison.
But is this a doc bug? Should <literal>binary</literal> be shown
quoted if it needs to be used quote? Or at least maybe the Example
section could include an example of the use of FORMAT.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-01-29 22:52:16 Re: BUG #7836: COPY command does not honor 'FORMAT' option
Previous Message Kurt Lidl 2013-01-29 20:58:29 Re: BUG #7836: COPY command does not honor 'FORMAT' option