1START TRANSACTION() SQL Commands START TRANSACTION()
2
3
4
6 START TRANSACTION - start a transaction block
7
8
10 START TRANSACTION [ transaction_mode [, ...] ]
11
12 where transaction_mode is one of:
13
14 ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
15 READ WRITE | READ ONLY
16
17
19 This command begins a new transaction block. If the isolation level or
20 read/write mode is specified, the new transaction has those character‐
21 istics, as if SET TRANSACTION [set_transaction(7)] was executed. This
22 is the same as the BEGIN [begin(7)] command.
23
25 Refer to SET TRANSACTION [set_transaction(7)] for information on the
26 meaning of the parameters to this statement.
27
29 In the standard, it is not necessary to issue START TRANSACTION to
30 start a transaction block: any SQL command implicitly begins a block.
31 PostgreSQL's behavior can be seen as implicitly issuing a COMMIT after
32 each command that does not follow START TRANSACTION (or BEGIN), and it
33 is therefore often called ``autocommit''. Other relational database
34 systems may offer an autocommit feature as a convenience.
35
36 The SQL standard requires commas between successive transaction_modes,
37 but for historical reasons PostgreSQL allows the commas to be omitted.
38
39 See also the compatibility section of SET TRANSACTION [set_transac‐
40 tion(7)].
41
43 BEGIN [begin(7)], COMMIT [commit(l)], ROLLBACK [rollback(l)], SAVEPOINT
44 [savepoint(l)], SET TRANSACTION [set_transaction(l)]
45
46
47
48SQL - Language Statements 2008-06-08 START TRANSACTION()