~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/rollback.sgml

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback.sgml,v 1.18 2004-08-01 17:32:13 tgl Exp $
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-ROLLBACK">
 
7
 <refmeta>
 
8
  <refentrytitle id="SQL-ROLLBACK-TITLE">ROLLBACK</refentrytitle>
 
9
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
10
 </refmeta>
 
11
 
 
12
 <refnamediv>
 
13
  <refname>ROLLBACK</refname>
 
14
  <refpurpose>abort the current transaction</refpurpose>
 
15
 </refnamediv>
 
16
 
 
17
 <indexterm zone="sql-rollback">
 
18
  <primary>ROLLBACK</primary>
 
19
 </indexterm>
 
20
 
 
21
 <refsynopsisdiv>
 
22
<synopsis>
 
23
ROLLBACK [ WORK | TRANSACTION ]
 
24
</synopsis>
 
25
 </refsynopsisdiv>
 
26
 
 
27
 <refsect1>
 
28
  <title>Description</title>
 
29
 
 
30
  <para>
 
31
   <command>ROLLBACK</command> rolls back the current transaction and causes
 
32
   all the updates made by the transaction to be discarded.
 
33
  </para>
 
34
 </refsect1>
 
35
 
 
36
 <refsect1>
 
37
  <title>Parameters</title>
 
38
 
 
39
  <variablelist>
 
40
   <varlistentry>
 
41
    <term><literal>WORK</literal></term>
 
42
    <term><literal>TRANSACTION</literal></term>
 
43
    <listitem>
 
44
     <para>
 
45
      Optional key words. They have no effect.
 
46
     </para>
 
47
    </listitem>
 
48
   </varlistentry>
 
49
  </variablelist>
 
50
 </refsect1>
 
51
 
 
52
 <refsect1>
 
53
  <title>Notes</title>
 
54
 
 
55
  <para>
 
56
   Use <xref linkend="SQL-COMMIT" endterm="SQL-COMMIT-TITLE"> to
 
57
   successfully terminate a transaction.
 
58
  </para>
 
59
 
 
60
  <para>
 
61
   Issuing <command>ROLLBACK</> when not inside a transaction does
 
62
   no harm, but it will provoke a warning message.
 
63
  </para>
 
64
 </refsect1>
 
65
 
 
66
 <refsect1>
 
67
  <title>Examples</title>
 
68
 
 
69
  <para>
 
70
   To abort all changes:
 
71
<programlisting>
 
72
ROLLBACK;
 
73
</programlisting>
 
74
  </para>
 
75
 </refsect1>
 
76
 
 
77
 <refsect1>
 
78
  <title>Compatibility</title>
 
79
 
 
80
  <para>
 
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.
 
84
  </para>
 
85
 </refsect1>
 
86
 
 
87
 <refsect1>
 
88
  <title>See Also</title>
 
89
 
 
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>
 
94
  </simplelist>
 
95
 </refsect1>
 
96
</refentry>
 
97
 
 
98
<!-- Keep this comment at the end of the file
 
99
Local variables:
 
100
mode: sgml
 
101
sgml-omittag:nil
 
102
sgml-shorttag:t
 
103
sgml-minimize-attributes:nil
 
104
sgml-always-quote-attributes:t
 
105
sgml-indent-step:1
 
106
sgml-indent-data: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
 
112
End:
 
113
-->