Re: psql: immediately exit after an error?

From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: psql: immediately exit after an error?
Date: 2004-08-11 14:38:36
Message-ID: 411A2F6C.9090409@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-11 14:42:06 Re: Slony setup help needed
Previous Message Richard Huxton 2004-08-11 14:35:23 Re: Resultset problem or BUG !