Re: psql \set vs \copy - bug or expected behaviour? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql \set vs \copy - bug or expected behaviour?
Date
Msg-id 17553.1345225123@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql \set vs \copy - bug or expected behaviour?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: psql \set vs \copy - bug or expected behaviour?
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Fri, Oct 21, 2011 at 05:31:41PM -0400, Robert Haas wrote:
>> I'm not sure whether that's a bug per se, but I can see where a
>> behavior change might be an improvement.

> I did some research on this and learned a little more about flex rules.

> Turns out we can allow variable substitution in psql whole-line
> commands, like \copy and \!, by sharing the variable expansion flex
> rules with the code that does argument processing.  

Well, it'd be nice to allow substitution there ...

> What we can't easily do is to allow quotes to prevent variable
> substitution in these whole-line commands because we can't process the
> quotes because that will remove them.

... but if there is then no way to prevent it, that's absolutely
unacceptable.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Not HOT enough
Next
From: Richard Huxton
Date:
Subject: Re: psql \set vs \copy - bug or expected behaviour?