2 doc/src/sgml/ref/start_transaction.sgml
3 PostgreSQL documentation
6 <refentry id=
"sql-start-transaction">
7 <indexterm zone=
"sql-start-transaction">
8 <primary>START TRANSACTION
</primary>
12 <refentrytitle>START TRANSACTION
</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
18 <refname>START TRANSACTION
</refname>
19 <refpurpose>start a transaction block
</refpurpose>
24 START TRANSACTION [
<replaceable class=
"parameter">transaction_mode
</replaceable> [, ...] ]
26 <phrase>where
<replaceable class=
"parameter">transaction_mode
</replaceable> is one of:
</phrase>
28 ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
29 READ WRITE | READ ONLY
35 <title>Description
</title>
38 This command begins a new transaction block. If the isolation level,
39 read/write mode, or deferrable mode is specified, the new transaction has those
40 characteristics, as if
<link linkend=
"sql-set-transaction"><command>SET TRANSACTION
</command></link> was executed. This is the same
41 as the
<link linkend=
"sql-begin"><command>BEGIN
</command></link> command.
46 <title>Parameters
</title>
49 Refer to
<xref linkend=
"sql-set-transaction"/> for information on the meaning
50 of the parameters to this statement.
55 <title>Compatibility
</title>
58 In the standard, it is not necessary to issue
<command>START TRANSACTION
</command>
59 to start a transaction block: any SQL command implicitly begins a block.
60 <productname>PostgreSQL
</productname>'s behavior can be seen as implicitly
61 issuing a
<command>COMMIT
</command> after each command that does not
62 follow
<command>START TRANSACTION
</command> (or
<command>BEGIN
</command>),
63 and it is therefore often called
<quote>autocommit
</quote>.
64 Other relational database systems might offer an autocommit feature
69 The
<literal>DEFERRABLE
</literal>
70 <replaceable class=
"parameter">transaction_mode
</replaceable>
71 is a
<productname>PostgreSQL
</productname> language extension.
75 The SQL standard requires commas between successive
<replaceable
76 class=
"parameter">transaction_modes
</replaceable>, but for historical
77 reasons
<productname>PostgreSQL
</productname> allows the commas to be
82 See also the compatibility section of
<xref linkend=
"sql-set-transaction"/>.
87 <title>See Also
</title>
89 <simplelist type=
"inline">
90 <member><xref linkend=
"sql-begin"/></member>
91 <member><xref linkend=
"sql-commit"/></member>
92 <member><xref linkend=
"sql-rollback"/></member>
93 <member><xref linkend=
"sql-savepoint"/></member>
94 <member><xref linkend=
"sql-set-transaction"/></member>