3 PostgreSQL documentation
6 <refentry id=
"SQL-COMMIT">
8 <refentrytitle id=
"SQL-COMMIT-TITLE">COMMIT
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>COMMIT
</refname>
15 <refpurpose>commit the current transaction
</refpurpose>
18 <indexterm zone=
"sql-commit">
19 <primary>COMMIT
</primary>
24 COMMIT [ WORK | TRANSACTION ]
29 <title>Description
</title>
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.
39 <title>Parameters
</title>
43 <term><literal>WORK
</literal></term>
44 <term><literal>TRANSACTION
</literal></term>
47 Optional key words. They have no effect.
58 Use
<xref linkend=
"SQL-ROLLBACK" endterm=
"SQL-ROLLBACK-TITLE"> to
63 Issuing
<command>COMMIT<
/> when not inside a transaction does
64 no harm, but it will provoke a warning message.
69 <title>Examples
</title>
72 To commit the current transaction and make all changes permanent:
80 <title>Compatibility
</title>
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.
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>