Re: Alternative to psql -c ?

From: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
To: James Le Cuirot <chewi(at)aura-online(dot)co(dot)uk>
Cc: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Alternative to psql -c ?
Date: 2014-06-25 14:42:53
Message-ID: CAKrjmhctDOxTcey3-QmFOrzeVZ2-q3OF3q12VSt2+OUzef5LKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Perhaps you can explain what is the functionality you want to achieve, as
I, for one, don't understand. Do you want transactions? Or not?

Also - I have no idea what "peer authentication" has to do with Pg gem -
care to elaborate? The gem is for client, and authentication happens in
server, so ... ?

depesz

On Wed, Jun 25, 2014 at 4:37 PM, James Le Cuirot <chewi(at)aura-online(dot)co(dot)uk>
wrote:

> On Wed, 25 Jun 2014 10:24:53 -0400
> Andrew Sullivan <ajs(at)crankycanuck(dot)ca> wrote:
>
> > 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
>
> Sorry, you're missing the point. I'm trying not to alter the existing
> behaviour of the Chef database cookbook which is used by countless
> people to execute scripts big and small, with and without transactions.
> If I just naively wrapped them all in BEGIN/COMMIT then it would
> override any additional transactions within the scripts.
>
> James
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Le Cuirot 2014-06-25 15:18:45 Re: Alternative to psql -c ?
Previous Message Andrew Sullivan 2014-06-25 14:38:35 Re: Alternative to psql -c ?