3 PostgreSQL documentation
6 <refentry id=
"SQL-ABORT">
8 <refentrytitle id=
"sql-abort-title">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" endterm=
"SQL-ROLLBACK-TITLE">,
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" endterm=
"SQL-COMMIT-TITLE"> 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>
83 <title>Compatibility
</title>
86 This command is a
<productname>PostgreSQL
</productname> extension
87 present for historical reasons.
<command>ROLLBACK
</command> is the
88 equivalent standard SQL command.
93 <title>See Also
</title>
95 <simplelist type=
"inline">
96 <member><xref linkend=
"sql-begin" endterm=
"sql-begin-title"></member>
97 <member><xref linkend=
"sql-commit" endterm=
"sql-commit-title"></member>
98 <member><xref linkend=
"sql-rollback" endterm=
"sql-rollback-title"></member>