postgresql/doc/src/sgml/ref/commit.sgml

152 lines
2.9 KiB
Plaintext
Raw Normal View History

<refentry id="SQL-COMMIT">
<refmeta>
<refentrytitle id="SQL-COMMIT-TITLE">
1998-05-13 07:34:00 +02:00
COMMIT
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
1998-05-13 07:34:00 +02:00
COMMIT
</refname>
<refpurpose>
1998-05-13 07:34:00 +02:00
Commits the current transaction
</refpurpose>
</refnamediv>
1998-05-13 07:34:00 +02:00
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
1998-09-16 16:43:12 +02:00
COMMIT [ WORK | TRANSACTION ]
</synopsis>
1998-05-13 07:34:00 +02:00
<refsect2 id="R2-SQL-COMMIT-1">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
1998-05-13 07:34:00 +02:00
Inputs
</title>
<para>
None.
</para>
</refsect2>
1998-05-13 07:34:00 +02:00
<refsect2 id="R2-SQL-COMMIT-2">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
1998-05-13 07:34:00 +02:00
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
END
</computeroutput></term>
<listitem>
<para>
Message returned if the transaction is successfully committed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE EndTransactionBlock and not inprogress/abort state
</computeroutput></term>
<listitem>
<para>
If there is no transaction in progress.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
1998-05-13 07:34:00 +02:00
<refsect1 id="R1-SQL-COMMIT-1">
<refsect1info>
<date>1998-09-08</date>
</refsect1info>
<title>
1998-05-13 07:34:00 +02:00
Description
</title>
<para>
1998-09-16 16:43:12 +02:00
<command>COMMIT</command> commits the current transaction. All
1998-05-13 07:34:00 +02:00
changes made by the transaction become visible to others
and are guaranteed to be durable if a crash occurs.
</para>
1998-05-13 07:34:00 +02:00
<refsect2 id="R2-SQL-COMMIT-3">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
1998-05-13 07:34:00 +02:00
Notes
</title>
<para>
1998-09-16 16:43:12 +02:00
The keywords WORK and TRANSACTION are noise and can be omitted.
</para>
1998-05-13 07:34:00 +02:00
<para>
Use <xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
to abort a transaction.
1998-05-13 07:34:00 +02:00
</para>
</refsect2>
1998-05-13 07:34:00 +02:00
</refsect1>
<refsect1 id="R1-SQL-COMMIT-2">
<title>
1998-05-13 07:34:00 +02:00
Usage
</title>
<para>
To make all changes permanent:
<programlisting>
1998-09-16 16:43:12 +02:00
COMMIT WORK;
</programlisting>
</para>
</refsect1>
1998-05-13 07:34:00 +02:00
<refsect1 id="R1-SQL-COMMIT-3">
<title>
1998-05-13 07:34:00 +02:00
Compatibility
</title>
<para>
</para>
1998-05-13 07:34:00 +02:00
<refsect2 id="R2-SQL-COMMIT-4">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
1998-05-13 07:34:00 +02:00
SQL92
</title>
<para>
1998-05-13 07:34:00 +02:00
Full compatibility.
</para>
1998-05-13 07:34:00 +02:00
</refsect2>
</refsect1>
</refentry>
1998-05-13 07:34:00 +02:00
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
1998-05-13 07:34:00 +02:00
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->