Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / doc / src / sgml / ref / commit.sgml
blob05ab3612de5fd1b0f7d55538950550c06ce5e85e
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-COMMIT">
7 <refmeta>
8 <refentrytitle id="SQL-COMMIT-TITLE">COMMIT</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>COMMIT</refname>
15 <refpurpose>commit the current transaction</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-commit">
19 <primary>COMMIT</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 COMMIT [ WORK | TRANSACTION ]
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>COMMIT</command> commits the current transaction. All
33 changes made by the transaction become visible to others
34 and are guaranteed to be durable if a crash occurs.
35 </para>
36 </refsect1>
38 <refsect1>
39 <title>Parameters</title>
41 <variablelist>
42 <varlistentry>
43 <term><literal>WORK</literal></term>
44 <term><literal>TRANSACTION</literal></term>
45 <listitem>
46 <para>
47 Optional key words. They have no effect.
48 </para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsect1>
54 <refsect1>
55 <title>Notes</title>
57 <para>
58 Use <xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE"> to
59 abort a transaction.
60 </para>
62 <para>
63 Issuing <command>COMMIT</> when not inside a transaction does
64 no harm, but it will provoke a warning message.
65 </para>
66 </refsect1>
68 <refsect1>
69 <title>Examples</title>
71 <para>
72 To commit the current transaction and make all changes permanent:
73 <programlisting>
74 COMMIT;
75 </programlisting>
76 </para>
77 </refsect1>
79 <refsect1>
80 <title>Compatibility</title>
82 <para>
83 The SQL standard only specifies the two forms
84 <literal>COMMIT</literal> and <literal>COMMIT
85 WORK</literal>. Otherwise, this command is fully conforming.
86 </para>
87 </refsect1>
89 <refsect1>
90 <title>See Also</title>
92 <simplelist type="inline">
93 <member><xref linkend="sql-begin" endterm="sql-begin-title"></member>
94 <member><xref linkend="sql-rollback" endterm="sql-rollback-title"></member>
95 </simplelist>
96 </refsect1>
97 </refentry>