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

2013-06-01 Thread Simon Riggs
On 27 May 2013 15:31, Tom Lane wrote: > 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_na

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 wrote: > 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 |

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

2013-05-27 Thread Tom Lane
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_Sco

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

2013-05-27 Thread Simon Riggs
On 26 May 2013 17:10, Tom Lane wrote: > Heikki Linnakangas 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 | type_func_name_keyword", and > then replace ColId_or

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

2013-05-27 Thread Simon Riggs
On 26 May 2013 16:35, Heikki Linnakangas 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 list of formats,

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

2013-05-26 Thread Tom Lane
Heikki Linnakangas 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 > +++ b/src/backe

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 rea