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