Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0K3Y-0004V6-KK for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2013 22:53:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U0K3Y-0007Hc-2q for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2013 22:53:32 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0K3W-0007Gd-PC for pgsql-bugs@postgresql.org; Tue, 29 Jan 2013 22:53:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0K3V-0008S2-KX for pgsql-bugs@postgresql.org; Tue, 29 Jan 2013 22:53: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 r0TMqHPO006033; Tue, 29 Jan 2013 17:52:17 -0500 (EST) From: Tom Lane To: Jeff Janes cc: depesz@depesz.com, kurt.lidl@cello.com, pgsql-bugs@postgresql.org Subject: Re: BUG #7836: COPY command does not honor 'FORMAT' option In-reply-to: References: <20130129201905.GA30627@depesz.com> Comments: In-reply-to Jeff Janes message dated "Tue, 29 Jan 2013 13:46:32 -0800" Date: Tue, 29 Jan 2013 17:52:16 -0500 Message-ID: <6032.1359499936@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) 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 Jeff Janes 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 binary 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs