Re: Bulk Data Entry - Mailing list pgsql-general

From Richard Huxton
Subject Re: Bulk Data Entry
Date
Msg-id 46010957.4080002@archonet.com
Whole thread Raw
In response to Bulk Data Entry  (Naz Gassiep <naz@mira.net>)
Responses Re: Bulk Data Entry  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Naz Gassiep wrote:
> psql blogbogdev -f ./blogbog_tables.sql > ./blogbog_tables_inserted.log
> psql blogbogdev -f ./blogbog_data.sql > ./blogbog_data_inserted.log
> psql blogbogdev -f ./blogbog_constraints.sql >
> ./blogbog_constraints_applied.log

> I really would prefer psql to halt on error instead of just continuing
> to plow right ahead, but IIRC there was a discussion about this and it
> was decided that continuing was the best behavior.

Check the psql man-page for "ON_ERROR_STOP":
psql ... -v 'ON_ERROR_STOP=' ...

> I have grepped the .log files that the script outputs for "ERROR" but
> there is none. How would one go about finding where the error in an SQL
> script is?

You're not redirecting STDERR, just STDOUT

psql .... >insert.log 2>insert.err

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Naz Gassiep
Date:
Subject: Re: Lifecycle of PostgreSQL releases
Next
From: Richard Huxton
Date:
Subject: Re: Bulk Data Entry