Re: psql question: aborting a "script" - Mailing list pgsql-general

From Francisco Olarte
Subject Re: psql question: aborting a "script"
Date
Msg-id CA+bJJbzMpG6vfiEqdX+GHe908UVgA3=8OfkyBe92NH7apMVxJg@mail.gmail.com
Whole thread Raw
In response to Re: psql question: aborting a "script"  (Melvin Davidson <melvin6925@gmail.com>)
List 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 by date:

Previous
From: Brent Wood
Date:
Subject: Re: Unique UUID value - PostgreSQL 9.2
Next
From: Matthias Schmitt
Date:
Subject: pg_dump crashing