diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-04-28 13:09:59 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-04-28 13:09:59 +0000 |
commit | a65b1b738c07c98baaf38289eccd1b5fa054453d (patch) | |
tree | 6346211d52faede96d6737dd5691cedba85160bd /doc/src | |
parent | 989b55c550ca2e55640de62c38218ff000f7a6eb (diff) | |
download | postgresql-a65b1b738c07c98baaf38289eccd1b5fa054453d.tar.gz postgresql-a65b1b738c07c98baaf38289eccd1b5fa054453d.zip |
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".
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 24 |
1 files changed, 23 insertions, 1 deletions
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 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.134 2005/03/14 06:19:01 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.135 2005/04/28 13:09:59 momjian Exp $ PostgreSQL documentation --> @@ -2050,6 +2050,28 @@ bar </varlistentry> <varlistentry> + <indexterm> + <primary>rollback</primary> + <secondary>psql</secondary> + </indexterm> + <term><varname>ON_ERROR_ROLLBACK</varname></term> + <listitem> + <para> + When <literal>on</>, if a statement in a transaction block + generates an error, the error is ignored and the transaction + continues. When <literal>interactive</>, such errors are only + ignored in interactive sessions, and not when reading script + files. When <literal>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 <command>SAVEPONT</> for you, just before each command + that is in a transaction block, and rolls back to the savepoint + on error. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><varname>ON_ERROR_STOP</varname></term> <listitem> <para> |