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

2013-06-01 Thread Simon Riggs
On 27 May 2013 15:31, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 26 May 2013 17:10, Tom Lane t...@sss.pgh.pa.us wrote: More readable would be to invent an intermediate nonterminal falling between ColId and ColLabel, whose expansion would be IDENT |

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

2013-05-28 Thread Robert Haas
On Mon, May 27, 2013 at 10:31 AM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 26 May 2013 17:10, Tom Lane t...@sss.pgh.pa.us wrote: More readable would be to invent an intermediate nonterminal falling between ColId and ColLabel, whose expansion would be

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

2013-05-27 Thread Simon Riggs
On 26 May 2013 16:35, Heikki Linnakangas hlinnakan...@vmware.com wrote: My attempts to fix that look pretty ugly, so I'm not even going to post them. I can stop the error on binary by causing errors on csv and text, obviously not a fix. Any grammar based fix looks like it would restrict the

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

2013-05-27 Thread Simon Riggs
On 26 May 2013 17:10, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: More readable would be to invent an intermediate nonterminal falling between ColId and ColLabel, whose expansion would be IDENT | unreserved_keyword | col_name_keyword |

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

2013-05-27 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 26 May 2013 17:10, Tom Lane t...@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,

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

2013-05-26 Thread Heikki Linnakangas
On 26.05.2013 04:31, Simon Riggs wrote: This works fine... COPY pgbench_accounts TO '/tmp/acc' BINARY; This new format does not COPY pgbench_accounts FROM '/tmp/acc' (FORMAT BINARY); ERROR: syntax error at or near BINARY at character 47 which looks like I've mistyped something. Until you

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

2013-05-26 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: On 26.05.2013 04:31, Simon Riggs wrote: This new format does not [work:] COPY pgbench_accounts FROM '/tmp/acc' (FORMAT BINARY); ERROR: syntax error at or near BINARY at character 47 This seems to work: --- a/src/backend/parser/gram.y +++