pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: psql terminates on first error
Date: Thu, 2 Mar 2023 14:45:08 +0100 (CET)
Message-ID: <1402808643.90840.1677764708832@office.mailbox.org> (raw)
In-Reply-To: <ed1d66b8-1250-1e2d-cacf-b81aa9433cc8@jakobs.com>
References: <572addf0-5116-cec0-77fb-9a0ba0161240@jakobs.com>
	<453307953.83682.1677760371729@office.mailbox.org>
	<c2f5c47e-f603-a54a-7ad1-2d780857523e@jakobs.com>
	<1b41a19f-5672-e185-f3ec-df96c6dcbae7@gmx.net>
	<ed1d66b8-1250-1e2d-cacf-b81aa9433cc8@jakobs.com>

> On 02/03/2023 14:30 CET Holger Jakobs <holger@jakobs.com> wrote:
>
> Am 02.03.23 um 13:48 schrieb Thomas Kellerer:
> > Holger Jakobs schrieb am 02.03.2023 um 13:44:
> >>>> 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.
> >> No, it was in cmd.exe or in bash
> > I find using pipes with the Postgres command line tools on Windows
> > unreliable in general (including cmd.exe). So if you did use
> > redirection/pips, try without.
>
> Whether I use pipes or writing stdout of pg_dumpall to a file and 
> reading back with psql from the file made no difference.

Try pg_dumpall with option -f instead of redirecting stdout:

	pg_dumpall -f dump.sql
	psql -f dump.sql

Redirecting stdout to an intermediate file should have the same effect as
piping to psql.

And what error do you get from psql?

--
Erik





view thread (8+ messages)  latest in thread

Message-ID: <1402808643.90840.1677764708832@office.mailbox.org>
Permalink:  ../1402808643.90840.1677764708832@office.mailbox.org/
Also on:    postgresql.org/message-id/1402808643.90840.1677764708832@office.mailbox.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ewie@ewie.name, holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: psql terminates on first error
  In-Reply-To: <1402808643.90840.1677764708832@office.mailbox.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox