Re: [HACKERS] \copy (query) delimiter syntax error - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: [HACKERS] \copy (query) delimiter syntax error
Date
Msg-id 45C64E19.4080000@dunslane.net
Whole thread Raw
In response to Re: [HACKERS] \copy (query) delimiter syntax error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] \copy (query) delimiter syntax error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> 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 much of a change for the stable
>> branch?
>>
>
> We've never promised that psql's backslash commands would work at all
> with older backends, so I think removing compatibility with pre-7.3
> backends at this point isn't a problem.  OTOH, going out of your way
> to remove compatibility seems a bit pointless, so I'd vote against the
> "have_query" parts of this patch.  Just change the output format.
>
>
>

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.

I don't have very strong feelings either way - anybody else have an
opinion? If not, I'll go with Tom's suggestion.

cheers

andrew

pgsql-patches by date:

Previous
From: Jeremy Drake
Date:
Subject: Re: [HACKERS] writing new regexp functions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] \copy (query) delimiter syntax error