Re: Alternative to psql -c ?

Поиск
Список
Период
Сортировка
От James Le Cuirot
Тема Re: Alternative to psql -c ?
Дата
Msg-id 20140625153711.48f9733b@red.yakaraplc.local
обсуждение исходный текст
Ответ на Re: Alternative to psql -c ?  (Andrew Sullivan <ajs@crankycanuck.ca>)
Ответы Re: Alternative to psql -c ?  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Alternative to psql -c ?  (hubert depesz lubaczewski <depesz@gmail.com>)
Список pgsql-general
On Wed, 25 Jun 2014 10:24:53 -0400
Andrew Sullivan <ajs@crankycanuck.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Alternative to psql -c ?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Alternative to psql -c ?