Christopher Browne <cbbro...@gmail.com> writes:
> On Fri, May 10, 2013 at 9:50 AM, Peter Eisentraut <pete...@gmx.net> wrote:
>> My first use of 9.3beta1 in development failed because of changes
>> introduced by this patch, specifically because of the newly introduced
>> error
>> 
>> psql: -1 is incompatible with -c and -l
>> 
>> I'm not convinced this is correct.  -c and -l are single-transaction
>> actions almost by definition.
>> 
>> This particular aspect of the change wasn't really brought up in the
>> original thread.  What was your thinking?

> I'm not sure I agree with you vis-a-vis the -c option, as it is certainly
> plausible/meaningful
> to do:
>   psql -c "begin; update [something]; insert [something]; delete
> [something]; commit;"
> and for that to be different from
>   psql -c "update [something]; insert [something]; delete [something];"

While it might be *plausible* for those to be different, that's not
actually how -c works in practice, because it sends the string as a
single PQexec, which has the effect of making the string a single
transaction even if the string does not contain begin/end explicitly.

I think Peter is right and this error is bogus.  Whatever redeeming
social value it might have for sticklers is not worth breaking existing
apps for.

                        regards, tom lane


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to