]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/end.sgml
Create a "sort support" interface API for faster sorting.
[postgresql] / doc / src / sgml / ref / end.sgml
1 <!--
2 doc/src/sgml/ref/end.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-END">
7  <refmeta>
8   <refentrytitle>END</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>END</refname>
15   <refpurpose>commit the current transaction</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-end">
19   <primary>END</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 END [ WORK | TRANSACTION ]
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
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   </para>
38  </refsect1>
39
40  <refsect1>
41   <title>Parameters</title>
42
43   <variablelist>
44    <varlistentry>
45     <term><literal>WORK</literal></term>
46     <term><literal>TRANSACTION</literal></term>
47     <listitem>
48      <para>
49       Optional key words. They have no effect.
50      </para>
51     </listitem>
52    </varlistentry>
53   </variablelist>
54  </refsect1>
55
56  <refsect1>
57   <title>Notes</title>
58
59   <para>
60    Use <xref linkend="SQL-ROLLBACK"> to
61    abort a transaction.
62   </para>
63
64   <para>
65    Issuing <command>END</> when not inside a transaction does
66    no harm, but it will provoke a warning message.
67   </para>
68  </refsect1>
69
70  <refsect1>
71   <title>Examples</title>
72
73   <para>
74    To commit the current transaction and make all changes permanent:
75 <programlisting>
76 END;
77 </programlisting></para>
78  </refsect1>
79
80  <refsect1>
81   <title>Compatibility</title>
82
83   <para>
84    <command>END</command> is a <productname>PostgreSQL</productname>
85    extension that provides functionality equivalent to <xref
86    linkend="sql-commit">, which is
87    specified in the SQL standard.
88   </para>
89  </refsect1>
90
91  <refsect1>
92   <title>See Also</title>
93
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>
98   </simplelist>
99  </refsect1>
100 </refentry>