SET TRANSACTION v10
SET TRANSACTION -- set the characteristics of the current transaction.
transaction_mode is one of:
SET TRANSACTION command sets the characteristics of the current transaction. It has no effect on any subsequent transactions. The available transaction characteristics are the transaction isolation level and the transaction access mode (read/write or read-only). The isolation level of a transaction determines what data the transaction can see when other transactions are running concurrently:
A statement can only see rows committed before it began. This is the default.
All statements of the current transaction can only see rows committed before the first query or data-modification statement was executed in this transaction.
The transaction isolation level cannot be changed after the first query or data-modification statement (
FETCH) of a transaction has been executed. The transaction access mode determines whether the transaction is read/write or read-only. Read/write is the default.
When a transaction is read-only, the following SQL commands are disallowed:
DELETE if the table they would write to is not a temporary table; all
EXECUTE if the command it would execute is among those listed. This is a high-level notion of read-only that does not prevent all writes to disk.