Re: Alternative to psql -c ? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Alternative to psql -c ?
Date
Msg-id 20140625142453.GB49452@crankycanuck.ca
Whole thread Raw
In response to Re: Alternative to psql -c ?  (James Le Cuirot <chewi@aura-online.co.uk>)
Responses Re: Alternative to psql -c ?
List pgsql-general
On Wed, Jun 25, 2014 at 03:16:19PM +0100, James Le Cuirot wrote:
> Same problem as stdin, the transactional behaviour is different. There
> is the --single-transaction option but as the man page says...
>
> "If the script itself uses BEGIN, COMMIT, or ROLLBACK, this option will
> not have the desired effects."

Hmm.  I've _used_ transactions in such files, I'm pretty sure.  You
don't need the --single-transaction setting for this, just do the
BEGIN; and COMMIT; yourself.

A

--
Andrew Sullivan
ajs@crankycanuck.ca


pgsql-general by date:

Previous
From: James Le Cuirot
Date:
Subject: Re: Alternative to psql -c ?
Next
From: James Le Cuirot
Date:
Subject: Re: Alternative to psql -c ?