2
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback.sgml,v 1.18 2004-08-01 17:32:13 tgl Exp $
3
PostgreSQL documentation
6
<refentry id="SQL-ROLLBACK">
8
<refentrytitle id="SQL-ROLLBACK-TITLE">ROLLBACK</refentrytitle>
9
<refmiscinfo>SQL - Language Statements</refmiscinfo>
13
<refname>ROLLBACK</refname>
14
<refpurpose>abort the current transaction</refpurpose>
17
<indexterm zone="sql-rollback">
18
<primary>ROLLBACK</primary>
23
ROLLBACK [ WORK | TRANSACTION ]
28
<title>Description</title>
31
<command>ROLLBACK</command> rolls back the current transaction and causes
32
all the updates made by the transaction to be discarded.
37
<title>Parameters</title>
41
<term><literal>WORK</literal></term>
42
<term><literal>TRANSACTION</literal></term>
45
Optional key words. They have no effect.
56
Use <xref linkend="SQL-COMMIT" endterm="SQL-COMMIT-TITLE"> to
57
successfully terminate a transaction.
61
Issuing <command>ROLLBACK</> when not inside a transaction does
62
no harm, but it will provoke a warning message.
67
<title>Examples</title>
78
<title>Compatibility</title>
81
The SQL standard only specifies the two forms
82
<literal>ROLLBACK</literal> and <literal>ROLLBACK
83
WORK</literal>. Otherwise, this command is fully conforming.
88
<title>See Also</title>
90
<simplelist type="inline">
91
<member><xref linkend="sql-begin" endterm="sql-begin-title"></member>
92
<member><xref linkend="sql-commit" endterm="sql-commit-title"></member>
93
<member><xref linkend="sql-rollback-to" endterm="sql-rollback-to-title"></member>
98
<!-- Keep this comment at the end of the file
103
sgml-minimize-attributes:nil
104
sgml-always-quote-attributes:t
107
sgml-parent-document:nil
108
sgml-default-dtd-file:"../reference.ced"
109
sgml-exposed-tags:nil
110
sgml-local-catalogs:"/usr/lib/sgml/catalog"
111
sgml-local-ecat-files:nil