From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] COPY .... (FORMAT binary) syntax doesn't work
Date: Mon, 27 May 2013 10:31:26 -0400
Message-ID: <10844.1369665086@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+U5nML_ZrR2=ioFH4+edsPz=e7LgHq7e=u0BCd6pXsGidD9vQ@mail.gmail.com>
References: <CA+U5nML5zj43Mxk2FND-F+JH_tjxNs=_qePSV1aPOBJmsONYgg@mail.gmail.com>
<51A22BD3.4000604@vmware.com>
<13862.1369584649@sss.pgh.pa.us>
<CA+U5nML_ZrR2=ioFH4+edsPz=e7LgHq7e=u0BCd6pXsGidD9vQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 26 May 2013 17:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> More readable would be to invent an intermediate nonterminal falling
>> between ColId and ColLabel, whose expansion would be "IDENT |
>> unreserved_keyword | col_name_keyword | type_func_name_keyword", and
>> then replace ColId_or_Sconst with whatever-we-call-that_or_Sconst.
>> Any thoughts about a name for that new nonterminal?
> Do you think complicating the parser in that way is worth the trouble
> for this case? Could that slow down parsing?
It makes the grammar tables a bit larger (1% or so IIRC). There would
be some distributed penalty for that, but probably not much. Of course
there's always the slippery-slope argument about that.
> We don't actually have to fix it; clearly not too many people are
> bothered, since no complaints in 3 years. Documenting 'binary' seems
> better.
Well, my thought is there are other cases. For instance:
regression=# create role binary;
ERROR: syntax error at or near "binary"
LINE 1: create role binary;
^
regression=# create user cross;
ERROR: syntax error at or near "cross"
LINE 1: create user cross;
^
If we don't have to treat type_func_name_keywords as reserved in these
situations, shouldn't we avoid doing so?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndQuadrant.com, hlinnakangas@vmware.com, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] COPY .... (FORMAT binary) syntax doesn't work
In-Reply-To: <10844.1369665086@sss.pgh.pa.us>
References: <CA+U5nML5zj43Mxk2FND-F+JH_tjxNs=_qePSV1aPOBJmsONYgg@mail.gmail.com> <51A22BD3.4000604@vmware.com> <13862.1369584649@sss.pgh.pa.us> <CA+U5nML_ZrR2=ioFH4+edsPz=e7LgHq7e=u0BCd6pXsGidD9vQ@mail.gmail.com> <10844.1369665086@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox