Re: Alternative to psql -c ?

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Alternative to psql -c ?
Date: 2014-06-25 14:24:53
Message-ID: 20140625142453.GB49452@crankycanuck.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)crankycanuck(dot)ca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Le Cuirot 2014-06-25 14:37:11 Re: Alternative to psql -c ?
Previous Message James Le Cuirot 2014-06-25 14:16:19 Re: Alternative to psql -c ?