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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: depesz(at)depesz(dot)com, 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 22:52:16
Message-ID: 6032.1359499936@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> 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.

Yeah, BINARY is a type_func_name_keyword and hence not covered by the
copy_generic_opt_arg production.

> 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.

Probably better to see if we can fix the grammar instead of documenting
a klugy workaround. I'm not sure we can easily allow fully-reserved
words there, but type_func_name_keyword might work.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jan.mate 2013-01-29 23:50:14 BUG #7838: pg_dump major bug
Previous Message Jeff Janes 2013-01-29 21:46:32 Re: BUG #7836: COPY command does not honor 'FORMAT' option