Re: Does psql -f quit insertion after an error in a statement has been detected? - Mailing list pgsql-general

From Wang, Mary Y
Subject Re: Does psql -f quit insertion after an error in a statement has been detected?
Date
Msg-id FA20D4C4FEBFD148B1C0CB09913825FC04589DDC1A@XCH-SW-06V.sw.nos.boeing.com
Whole thread Raw
In response to Re: Does psql -f quit insertion after an error in a statement has been detected?  (Vick Khera <vivek@khera.org>)
Responses Re: Does psql -f quit insertion after an error in a statement has been detected?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
That's good to know.  I ended up manually copy/paste INSERT statements for each table to another file and rerun the
psql-f again.  It was painful!   

Mary
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Vick Khera
Sent: Monday, June 07, 2010 11:21 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Does psql -f quit insertion after an error in a statement has been detected?

On Sun, Jun 6, 2010 at 5:29 PM, Wang, Mary Y <mary.y.wang@boeing.com> wrote:
> I'm using a psql -f command to reload the data from a dump file.  I noticed that some tables are not populated with
anyrows (I mean 0 rows), yet, if I manually insert a row (actually just copy an INSERT statement from that input file)
inthe interactive terminal, that row was added with no problem.  So my question "does psql -f quits inserting rows for
atable when it detects there is an error in a statement?".  The impression that I got is that even though other rows
mightnot have any errors, but psql -f seems just quits after it detects an error in a row. 
>

See the psql man page, and search for "ON_ERROR_STOP". This controls this behavior.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: create index concurrently - duplicate index to reduce time without an index
Next
From: Bruce Momjian
Date:
Subject: Re: Misplaced pg_upgrade_support.so ?