Re: [BUGS] COPY .... (FORMAT binary) syntax doesn't work

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] COPY .... (FORMAT binary) syntax doesn't work
Date: 2013-05-28 14:05:53
Message-ID: CA+TgmoY_Nw8VjC4VoYQTYc3EdUsjUSUsYcD4QHJVfVfeKd1Ehw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, May 27, 2013 at 10:31 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>> On 26 May 2013 17:10, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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?

I am almost always in favor of making more things less reserved, so +1 from me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Joshua Berry 2013-05-28 14:20:23 Re: Segmentation Fault in Postgres server when using psqlODBC
Previous Message bkhamphousone 2013-05-28 13:36:48 BUG #8183: field timestamp result to date

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-05-28 14:07:06 Re: Extent Locks
Previous Message Robert Haas 2013-05-28 14:03:58 Re: fallocate / posix_fallocate for new WAL file creation (etc...)