On May 20, 2005, at 1:22 PM, Wei Weng wrote:
Say if I want to add a small snip of code in front of the sql script generated by the pg_dump, to check for something then if the condition doesn't match, the script terminates right away. (Without actually doing the restoring stuff that the following large chunk is supposed to do)
Can I do that?
Put this at the start of the file to make psql stop if there is an error:
\set ON_ERROR_STOP 1
And is it a good idea to add arbitrary code to the database dump sql script?
No problem if you know what you are doing and/or have good backups :)
John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]