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