stop psql on first error

Posted by ads on Saturday, 2007-10-20
Posted in [Code-Snippets][Postgresql-News]

Because I always forget how to stop psql on the first error:

1
\set ON_ERROR_STOP

You can include this at the top of your script/file, psql will stop right after the first error and will not try to continue any other commands in the chain.



Share: