Re: BUG #5333: psql returns 0 on error - Mailing list pgsql-bugs

From Alex Hunsaker
Subject Re: BUG #5333: psql returns 0 on error
Date
Msg-id 34d269d41002181011m429dc14bo52dc88aa86a31223@mail.gmail.com
Whole thread Raw
In response to BUG #5333: psql returns 0 on error  ("" <pekka.jarvinen@gmail.com>)
List pgsql-bugs
On Thu, Feb 18, 2010 at 02:20,  <pekka.jarvinen@gmail.com> wrote:
> $ psql -U foo -h 127.0.0.1 -f doesntwork.sql db
> Password for user foo:
> ERROR: =C2=A0invalid byte sequence for encoding "UTF8": 0xe46976
> HINT: =C2=A0This error can also happen if the byte sequence does not matc=
h the
> encoding expected by the server, which is controlled by "client_encoding".

> $ echo $?
> 0

You probably want to define ON_ERROR_STOP... see the man page about it.

psql -v 'ON_ERROR_STOP=3Don' ...

pgsql-bugs by date:

Previous
From: Tim Bunce
Date:
Subject: Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4
Next
From: Alex Hunsaker
Date:
Subject: Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4