Re: psql question: aborting a "script"

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: psql question: aborting a "script"
Дата
Msg-id CA+bJJbzMpG6vfiEqdX+GHe908UVgA3=8OfkyBe92NH7apMVxJg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql question: aborting a "script"  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
Hi Melvin:

On Tue, Mar 15, 2016 at 3:57 PM, Melvin Davidson <melvin6925@gmail.com> wrote:
> What you really want is
> "ON_ERROR_STOP
...
> So just
> SET ON_ERROR_STOP = ON
> before any other statements

IIRC you are right with the variable ... BUT .. it is a psql setting,
not a session setting, so he'll probably need to use the \set psql
mettacommand:

\set ON_ERROR_STOP on

and also, use on as suggested on the docs, not ON, I'm not sure wether
PSQL is case sensitive.

Francisco Olarte.


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

Предыдущее
От: Brent Wood
Дата:
Сообщение: Re: Unique UUID value - PostgreSQL 9.2
Следующее
От: Matthias Schmitt
Дата:
Сообщение: pg_dump crashing