Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-19 Thread Andrew Dunstan
I think I'll go with Tom's Plan B for HEAD, but not do anything more for 8.2 than has already been done. cheers andrew Bruce Momjian wrote: Did we come to a conclusion on this? --- Andrew Dunstan wrote: Andrew

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-05 Thread Andrew Dunstan
Andrew Dunstan wrote: Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The consequence will be, though, that psql will accept a syntax for \copy (query) ... that the corresponding backend command would reject were we not transforming it. That strikes me as potentially confusing.

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-04 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: oh, good point. OK, I have cut this quick patch that will continue to accept the legacy syntax in psql in non-inline-query cases, but will make psql unreservedly emit new style syntax for COPY to the backend. Does that seem reasonable, or is it too

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-04 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: oh, good point. OK, I have cut this quick patch that will continue to accept the legacy syntax in psql in non-inline-query cases, but will make psql unreservedly emit new style syntax for COPY to the backend. Does that seem

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-04 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: The consequence will be, though, that psql will accept a syntax for \copy (query) ... that the corresponding backend command would reject were we not transforming it. That strikes me as potentially confusing. Perhaps. What about plan B: remove the

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-04 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The consequence will be, though, that psql will accept a syntax for \copy (query) ... that the corresponding backend command would reject were we not transforming it. That strikes me as potentially confusing. Perhaps. What

[HACKERS] \copy (query) delimiter syntax error

2007-02-03 Thread Michael Fuhr
psql's \copy (query) with a delimiter yields a syntax error: test= \copy foo to foo.txt delimiter '|' (works) test= \copy (select * from foo) to foo.txt (works) test= \copy (select * from foo) to foo.txt delimiter '|' ERROR: syntax error at or near USING LINE 1: COPY ( select *

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-03 Thread Andrew Dunstan
Michael Fuhr wrote: psql's \copy (query) with a delimiter yields a syntax error: test= \copy foo to foo.txt delimiter '|' (works) test= \copy (select * from foo) to foo.txt (works) test= \copy (select * from foo) to foo.txt delimiter '|' ERROR: syntax error at or near USING

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-03 Thread Michael Fuhr
On Sat, Feb 03, 2007 at 10:52:29AM -0600, Andrew Dunstan wrote: I'd say fix psql. Not sure how far back we should backpatch it. It's interesting that this has been there since 8.0 and is only now discovered. The problem is new in 8.2 because COPY (query) doesn't support USING DELIMITERS. COPY

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-03 Thread Andrew Dunstan
Michael Fuhr wrote: On Sat, Feb 03, 2007 at 10:52:29AM -0600, Andrew Dunstan wrote: I'd say fix psql. Not sure how far back we should backpatch it. It's interesting that this has been there since 8.0 and is only now discovered. The problem is new in 8.2 because COPY (query) doesn't