START_TRANSACTION(7pg16)
π NAME π
START_TRANSACTION β start a transaction block. This is the PostgreSQL 16.15 Documentation page for START TRANSACTION(7), and it's lowkey iconic: it opens a new transaction block for you. Slay.
β¨ SYNOPSIS β¨
START TRANSACTION [ transaction_mode [, ...] ]
where transaction_mode is one of:
ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
READ WRITE | READ ONLY
[ NOT ] DEFERRABLE
No cap, that's the whole shape of it.
π¦ DESCRIPTION π¦
This command begins a new transaction block. If the isolation level, read/write mode, or deferrable mode is specified, the new transaction has those characteristics, as if SET TRANSACTION was executed. This is the same as the BEGIN command. Literally twins. π―ββοΈ
π PARAMETERS π
Refer to SET TRANSACTION (SET_TRANSACTION(7)) for information on the meaning of the parameters to this statement. That's where the parameter lore lives, bestie.
π COMPATIBILITY π
In the standard, it is not necessary to issue START TRANSACTION to start a transaction block: any SQL command implicitly begins a block.
PostgreSQL's behavior can be seen as implicitly issuing a COMMIT after each command that does not follow START TRANSACTION (or BEGIN), and it is therefore often called βautocommitβ. Other relational database systems might offer an autocommit feature as a convenience.
The DEFERRABLE transaction_mode is a PostgreSQL language extension.
The SQL standard requires commas between successive transaction_modes, but for historical reasons PostgreSQL allows the commas to be omitted.
See also the compatibility section of SET TRANSACTION (SET_TRANSACTION(7)).
π₯ SEE ALSO π₯
BEGIN(7)COMMIT(7)ROLLBACK(7)SAVEPOINT(7)SET TRANSACTION(SET_TRANSACTION(7))
xoxo, this page is from PostgreSQL 16.15, dated 2026, and it's the START TRANSACTION(7) page π«Άβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms