The code to unlink dropped relations in FinishPreparedTransaction() was
[PostgreSQL.git] / doc / src / sgml / ref / end.sgml
blob78f43adb3aeb820a891e8e20d3311c301d5d39da
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-END">
7 <refmeta>
8 <refentrytitle id="SQL-END-TITLE">END</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>END</refname>
15 <refpurpose>commit the current transaction</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-end">
19 <primary>END</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 END [ WORK | TRANSACTION ]
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>END</command> commits the current transaction. All changes
33 made by the transaction become visible to others and are guaranteed
34 to be durable if a crash occurs. This command is a
35 <productname>PostgreSQL</productname> extension
36 that is equivalent to <xref linkend="sql-commit"
37 endterm="sql-commit-title">.
38 </para>
39 </refsect1>
41 <refsect1>
42 <title>Parameters</title>
44 <variablelist>
45 <varlistentry>
46 <term><literal>WORK</literal></term>
47 <term><literal>TRANSACTION</literal></term>
48 <listitem>
49 <para>
50 Optional key words. They have no effect.
51 </para>
52 </listitem>
53 </varlistentry>
54 </variablelist>
55 </refsect1>
57 <refsect1>
58 <title>Notes</title>
60 <para>
61 Use <xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE"> to
62 abort a transaction.
63 </para>
65 <para>
66 Issuing <command>END</> when not inside a transaction does
67 no harm, but it will provoke a warning message.
68 </para>
69 </refsect1>
71 <refsect1>
72 <title>Examples</title>
74 <para>
75 To commit the current transaction and make all changes permanent:
76 <programlisting>
77 END;
78 </programlisting>
79 </para>
80 </refsect1>
82 <refsect1>
83 <title>Compatibility</title>
85 <para>
86 <command>END</command> is a <productname>PostgreSQL</productname>
87 extension that provides functionality equivalent to <xref
88 linkend="sql-commit" endterm="sql-commit-title">, which is
89 specified in the SQL standard.
90 </para>
91 </refsect1>
93 <refsect1>
94 <title>See Also</title>
96 <simplelist type="inline">
97 <member><xref linkend="sql-begin" endterm="sql-begin-title"></member>
98 <member><xref linkend="sql-commit" endterm="sql-commit-title"></member>
99 <member><xref linkend="sql-rollback" endterm="sql-rollback-title"></member>
100 </simplelist>
101 </refsect1>
102 </refentry>