Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

START TRANSACTION

Name

START TRANSACTION -- start a transaction block

Synopsis

START TRANSACTION [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ]
  

Inputs

None.

Outputs

START TRANSACTION

Message returned if successful.

WARNING: BEGIN: already a transaction in progress

If there is already a transaction in progress when the command is issued.

Description

This command begins a new transaction. If the isolation level is specified, the new transaction has that isolation level. In all other respects, the behavior of this command is identical to the BEGIN command.

Notes

The isolation level of a transaction can also be set with the SET TRANSACTION command. If no isolation level is specified, the default isolation level is used.

Compatibility

SQL99

SERIALIZABLE is the default isolation level in SQL99, but it is not the usual default in PostgreSQL: the factory default setting is READ COMMITTED. PostgreSQL does not provide the isolation levels READ UNCOMMITTED and REPEATABLE READ. Because of lack of predicate locking, the SERIALIZABLE level is not truly serializable. See the User's Guide for details.

In SQL99 this statement can specify two other properties of the new transaction: whether the transaction is read-only and the size of the diagnostics area. Neither of these concepts are currently supported in PostgreSQL.