1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2002-05-18 17:44:48 +02:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/rollback.sgml,v 1.13 2002/05/18 15:44:47 petere Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<refentry id="SQL-ROLLBACK">
|
|
|
|
<refmeta>
|
2002-04-21 21:02:39 +02:00
|
|
|
<refentrytitle id="SQL-ROLLBACK-TITLE">ROLLBACK</refentrytitle>
|
1999-06-14 09:37:05 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>
|
1999-07-06 19:16:42 +02:00
|
|
|
ROLLBACK
|
1999-06-14 09:37:05 +02:00
|
|
|
</refname>
|
|
|
|
<refpurpose>
|
2001-09-03 14:57:50 +02:00
|
|
|
abort the current transaction
|
1999-06-14 09:37:05 +02:00
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<refsynopsisdivinfo>
|
1999-07-22 17:09:15 +02:00
|
|
|
<date>1999-07-20</date>
|
1999-06-14 09:37:05 +02:00
|
|
|
</refsynopsisdivinfo>
|
|
|
|
<synopsis>
|
|
|
|
ROLLBACK [ WORK | TRANSACTION ]
|
|
|
|
</synopsis>
|
1998-09-01 17:53:09 +02:00
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<refsect2 id="R2-SQL-ROLLBACK-1">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-24</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
Inputs
|
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
None.
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
1998-09-01 17:53:09 +02:00
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<refsect2 id="R2-SQL-ROLLBACK-2">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-24</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
Outputs
|
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><computeroutput>
|
2002-05-18 17:44:48 +02:00
|
|
|
ROLLBACK
|
1999-07-06 19:16:42 +02:00
|
|
|
</computeroutput></term>
|
1999-06-14 09:37:05 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Message returned if successful.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><computeroutput>
|
2002-03-06 07:48:05 +01:00
|
|
|
WARNING: ROLLBACK: no transaction in progress
|
1999-07-06 19:16:42 +02:00
|
|
|
</computeroutput></term>
|
1999-06-14 09:37:05 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
If there is not any transaction currently in progress.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
</refsynopsisdiv>
|
1998-09-01 17:53:09 +02:00
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<refsect1 id="R1-SQL-ROLLBACK-1">
|
|
|
|
<refsect1info>
|
|
|
|
<date>1998-09-24</date>
|
|
|
|
</refsect1info>
|
|
|
|
<title>
|
|
|
|
Description
|
|
|
|
</title>
|
1998-09-01 17:53:09 +02:00
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<para>
|
|
|
|
<command>ROLLBACK</command> rolls back the current transaction and causes
|
|
|
|
all the updates made by the transaction to be discarded.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<refsect2 id="R2-SQL-ROLLBACK-3">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-24</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
Notes
|
|
|
|
</title>
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
Use <xref linkend="SQL-COMMIT" endterm="SQL-COMMIT-TITLE">
|
1999-06-14 09:37:05 +02:00
|
|
|
to successfully terminate a transaction.
|
2000-12-26 00:15:27 +01:00
|
|
|
<xref linkend="SQL-ABORT" endterm="SQL-ABORT-TITLE"> is a
|
1999-07-22 17:09:15 +02:00
|
|
|
synonym for <command>ROLLBACK</command>.
|
1999-06-14 09:37:05 +02:00
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id="R1-SQL-ROLLBACK-2">
|
|
|
|
<title>
|
|
|
|
Usage
|
|
|
|
</title>
|
|
|
|
<para>
|
1999-07-06 19:16:42 +02:00
|
|
|
To abort all changes:
|
|
|
|
|
1999-06-14 09:37:05 +02:00
|
|
|
<programlisting>
|
1999-07-06 19:16:42 +02:00
|
|
|
ROLLBACK WORK;
|
1999-06-14 09:37:05 +02:00
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id="R1-SQL-ROLLBACK-3">
|
|
|
|
<title>
|
|
|
|
Compatibility
|
|
|
|
</title>
|
|
|
|
|
|
|
|
<refsect2 id="R2-SQL-ROLLBACK-4">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-24</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
SQL92
|
|
|
|
</title>
|
|
|
|
<para>
|
2000-01-29 17:58:54 +01:00
|
|
|
<acronym>SQL92</acronym> only specifies the two forms <literal>ROLLBACK</literal>
|
|
|
|
and <literal>ROLLBACK WORK</literal>. Otherwise full compatibility.
|
1999-06-14 09:37:05 +02:00
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|