Re: psql terminates on first error - Mailing list pgsql-admin

From Erik Wienhold
Subject Re: psql terminates on first error
Date
Msg-id 453307953.83682.1677760371729@office.mailbox.org
Whole thread Raw
In response to psql terminates on first error  (Holger Jakobs <holger@jakobs.com>)
Responses Re: psql terminates on first error  (Holger Jakobs <holger@jakobs.com>)
List pgsql-admin
> On 02/03/2023 12:53 CET Holger Jakobs <holger@jakobs.com> wrote:
>
> While trying to transfer data from one instance to another using
> pg_dumpall and psql, the psql stopped on first error, causing pg_dumpall
> to terminate as well.
>
> This behaviour was seen on Windows (EDB installer), but is different on
> Linux.

Database on Windows and client on Linux?  What's the error and is it the same
on Linux?  Is there even an error on Linux?

> Only when using an option -c "\set ON_ERROR_STOP false" (plus -f - of
> course to continue reading) psql continued after first error.

Do you use PowerShell and pipe pg_dumpall into psql?  The first thing that
comes to my mind when reading Postgres+Windows is that PowerShell up to
version 5.1 converts stdout to UTF-16LE.  This already tripped me up in
past with pg_dump and psql.

--
Erik



pgsql-admin by date:

Previous
From: Holger Jakobs
Date:
Subject: psql terminates on first error
Next
From: Holger Jakobs
Date:
Subject: Re: psql terminates on first error