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