Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UgySS-0002gg-8V for pgsql-bugs@arkaria.postgresql.org; Mon, 27 May 2013 14:31:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UgySR-0003Ac-Le for pgsql-bugs@arkaria.postgresql.org; Mon, 27 May 2013 14:31:31 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UgySR-0003AX-1v for pgsql-bugs@postgresql.org; Mon, 27 May 2013 14:31:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UgySN-0000ww-HC for pgsql-bugs@postgresql.org; Mon, 27 May 2013 14:31:30 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r4REVQVm010845; Mon, 27 May 2013 10:31:26 -0400 (EDT) From: Tom Lane To: Simon Riggs cc: Heikki Linnakangas , pgsql-bugs , PostgreSQL-development Subject: Re: [HACKERS] COPY .... (FORMAT binary) syntax doesn't work In-reply-to: References: <51A22BD3.4000604@vmware.com> <13862.1369584649@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Mon, 27 May 2013 11:37:26 +0100" Date: Mon, 27 May 2013 10:31:26 -0400 Message-ID: <10844.1369665086@sss.pgh.pa.us> X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Simon Riggs writes: > On 26 May 2013 17:10, Tom Lane 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