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

From: Vick Khera <vivek(at)khera(dot)org>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does psql -f quit insertion after an error in a statement has been detected?
Date: 2010-06-07 18:21:15
Message-ID: AANLkTimQOB3iiDDjv3iE5ytiZozaKAw2winVvkiFbkm1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 6, 2010 at 5:29 PM, Wang, Mary Y <mary(dot)y(dot)wang(at)boeing(dot)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 any rows (I mean 0 rows), yet, if I manually insert a row (actually just copy an INSERT statement from that input file) in the interactive terminal, that row was added with no problem.  So my question "does psql -f quits inserting rows for a table when it detects there is an error in a statement?".  The impression that I got is that even though other rows might not 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glen Barber 2010-06-07 18:47:31 Re: Misplaced pg_upgrade_support.so ?
Previous Message Vick Khera 2010-06-07 18:13:20 Re: Dell Poweredge server and Postgres