Re: feature request: auto savepoint for interactive psql when in transaction.

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: feature request: auto savepoint for interactive psql when in transaction.
Дата
Msg-id 20110928192258.GZ12765@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: feature request: auto savepoint for interactive psql when in transaction.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: feature request: auto savepoint for interactive psql when in transaction.
Список pgsql-hackers
* Kevin Grittner (Kevin.Grittner@wicourts.gov) wrote:
> Alvaro Herrera <alvherre@commandprompt.com> wrote:
> > See ON_ERROR_ROLLBACK
> > http://www.postgresql.org/docs/9.0/static/app-psql.html
>
> I had missed that.  Dang, this database product is rich with nice
> features!  :-)

Be careful when running scripts, however..  Any invocation of psql will
read you .psqlrc and if you've got ON_ERROR_ROLLBACK set there then
psql -f blah ; will pick up on that and you'll end up running every
command in the script (including the commit at the end...), even if some
of the commands in it failed.

So, if you put it in your .psqlrc, be VERY sure that you UN-set it on
the command-line whenever running SQL scripts which *should* rollback on
failures..
Thanks,
    Stephen

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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: feature request: auto savepoint for interactive psql when in transaction.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: feature request: auto savepoint for interactive psql when in transaction.