1START TRANSACTION(7) PostgreSQL 16.1 Documentation START TRANSACTION(7)
2
3
4
6 START_TRANSACTION - start a transaction block
7
9 START TRANSACTION [ transaction_mode [, ...] ]
10
11 where transaction_mode is one of:
12
13 ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
14 READ WRITE | READ ONLY
15 [ NOT ] DEFERRABLE
16
18 This command begins a new transaction block. If the isolation level,
19 read/write mode, or deferrable mode is specified, the new transaction
20 has those characteristics, as if SET TRANSACTION was executed. This is
21 the same as the BEGIN command.
22
24 Refer to SET TRANSACTION (SET_TRANSACTION(7)) for information on the
25 meaning of the parameters to this statement.
26
28 In the standard, it is not necessary to issue START TRANSACTION to
29 start a transaction block: any SQL command implicitly begins a block.
30 PostgreSQL's behavior can be seen as implicitly issuing a COMMIT after
31 each command that does not follow START TRANSACTION (or BEGIN), and it
32 is therefore often called “autocommit”. Other relational database
33 systems might offer an autocommit feature as a convenience.
34
35 The DEFERRABLE transaction_mode is a PostgreSQL language extension.
36
37 The SQL standard requires commas between successive transaction_modes,
38 but for historical reasons PostgreSQL allows the commas to be omitted.
39
40 See also the compatibility section of SET TRANSACTION
41 (SET_TRANSACTION(7)).
42
44 BEGIN(7), COMMIT(7), ROLLBACK(7), SAVEPOINT(7), SET TRANSACTION
45 (SET_TRANSACTION(7))
46
47
48
49PostgreSQL 16.1 2023 START TRANSACTION(7)