2 doc/src/sgml/ref/abort.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-ABORT">
8 <refentrytitle>ABORT</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>ABORT</refname>
15 <refpurpose>abort the current transaction</refpurpose>
18 <indexterm zone="sql-abort">
19 <primary>ABORT</primary>
24 ABORT [ WORK | TRANSACTION ]
29 <title>Description</title>
32 <command>ABORT</command> rolls back the current transaction and causes
33 all the updates made by the transaction to be discarded.
34 This command is identical
35 in behavior to the standard <acronym>SQL</acronym> command
36 <xref linkend="SQL-ROLLBACK">,
37 and is present only for historical reasons.
42 <title>Parameters</title>
46 <term><literal>WORK</literal></term>
47 <term><literal>TRANSACTION</literal></term>
50 Optional key words. They have no effect.
61 Use <xref linkend="SQL-COMMIT"> to
62 successfully terminate a transaction.
66 Issuing <command>ABORT</> when not inside a transaction does
67 no harm, but it will provoke a warning message.
72 <title>Examples</title>
78 </programlisting></para>
82 <title>Compatibility</title>
85 This command is a <productname>PostgreSQL</productname> extension
86 present for historical reasons. <command>ROLLBACK</command> is the
87 equivalent standard SQL command.
92 <title>See Also</title>
94 <simplelist type="inline">
95 <member><xref linkend="sql-begin"></member>
96 <member><xref linkend="sql-commit"></member>
97 <member><xref linkend="sql-rollback"></member>