Search Postgresql Archives

Re: Bulk Data Entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux