From a65b1b738c07c98baaf38289eccd1b5fa054453d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 28 Apr 2005 13:09:59 +0000 Subject: Add psql \set ON_ERROR_ROLLBACK to allow statements in a transaction to error without affecting the entire transaction. Valid values are "on|interactive|off". --- doc/src/sgml/ref/psql-ref.sgml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 3a80b7f6940..41de5d5e7eb 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1,5 +1,5 @@ @@ -2049,6 +2049,28 @@ bar + + + rollback + psql + + ON_ERROR_ROLLBACK + + + When on, if a statement in a transaction block + generates an error, the error is ignored and the transaction + continues. When interactive, such errors are only + ignored in interactive sessions, and not when reading script + files. When off (the default), a statement in a + transaction block that generates an error aborts the entire + transaction. The on_error_rollback-on mode works by issuing an + implicit SAVEPONT for you, just before each command + that is in a transaction block, and rolls back to the savepoint + on error. + + + + ON_ERROR_STOP -- cgit v1.2.3