Starts a transaction block.
START TRANSACTION [SERIALIZABLE | READ COMMITTED | READ UNCOMMITTED] [READ WRITE | READ ONLY]
START TRANSACTION begins a new transaction block. If the isolation level or read/write mode is specified, the new transaction has those characteristics, as if SET TRANSACTION was executed. This is the same as the
REPEATABLE READ. The default behavior is that a statement can only see rows committed before it began (
READ COMMITTED). In Greenplum Database
READ UNCOMMITTEDis treated the same as
REPEATABLE READis not supported; use
SERIALIZABLEif this behavior is required.
SERIALIZABLE, wherein all statements of the current transaction can only see rows committed before the first statement was executed in the transaction, is the strictest transaction isolation. This level emulates serial transaction execution, as if transactions had been executed one after another, serially, rather than concurrently. Applications using this level must be prepared to retry transactions due to serialization failures.
COPY FROMif the table they would write to is not a temporary table; all
EXECUTEif the command they would execute is among those listed.
To begin a transaction block:
In the standard, it is not necessary to issue
START TRANSACTION to start a transaction block: any SQL command implicitly begins a block. Greenplum Database 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 may offer an autocommit feature as a convenience.
The SQL standard requires commas between successive transaction_modes, but for historical reasons Greenplum Database allows the commas to be omitted.
See also the compatibility section of SET TRANSACTION.
Parent topic: SQL Command Reference