Re: psql: immediately exit after an error? - Mailing list pgsql-general

From David Garamond
Subject Re: psql: immediately exit after an error?
Date
Msg-id 411A2F6C.9090409@zara.6.isreserved.com
Whole thread Raw
In response to psql: immediately exit after an error?  (David Garamond <lists@zara.6.isreserved.com>)
Responses Re: psql: immediately exit after an error?
List pgsql-general
Peter Eisentraut wrote:
>>Can psql be told to exit immediately after an error (especially when
>>doing commands from a file, -f)? This is the default behaviour of the
>>mysql client, except when we give it -f option ("force").
>
> \set ON_ERROR_STOP on
>
> Look into the psql man page for additional semantic details.

Thanks! Just what I was looking for.

Btw, may I suggest this line be added by pg_dump/pg_dumpall? Or even the
default being changed to on when -f is given? Or maybe add a command
line option for this?

--
dave

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Slony setup help needed
Next
From: Tom Lane
Date:
Subject: Re: Replication options?