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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, 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-09-10 20:48:32
Message-ID: 20130910204832.GD16378@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 29, 2013 at 05:52:16PM -0500, Tom Lane wrote:
> 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.

FYI, the need for single-quotes around 'binary' was removed with a patch
and backpatched.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2013-09-10 21:08:19 Re: BUG #8442: Postgresql Crash Frequently and It is installed on m68k platorm
Previous Message John R Pierce 2013-09-10 17:03:20 Re: Error by restore a database