mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
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".
This commit is contained in:
@ -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
|
||||
-->
|
||||
|
||||
@ -2049,6 +2049,28 @@ bar
|
||||
</listitem>
|
||||
</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>
|
||||
|
Reference in New Issue
Block a user