PostgreSQL/Transaction/Transaction Isolation

Материал из SQL эксперт
Перейти к: навигация, поиск

Displays the current transaction isolation level

postgres=# -- Displays the current transaction isolation level:
postgres=#
postgres=# SHOW TRANSACTION ISOLATION LEVEL;
 transaction_isolation
-----------------------
 read committed
(1 row)
postgres=#
postgres=#



Sets the constraint evaluation mode to IMMEDIATE for all constraints within the transaction

postgres=#
postgres=# -- Sets the constraint evaluation mode to IMMEDIATE for all constraints within the transaction:
postgres=#
postgres=# SET CONSTRAINTS ALL IMMEDIATE;
SET CONSTRAINTS
postgres=#
postgres=#



Sets the transaction isolation level to SERIALIZABLE for the current transaction

postgres=#
postgres=# -- Sets the transaction isolation level to SERIALIZABLE for the current transaction:
postgres=#
postgres=# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET
postgres=#
postgres=#



Set the default transaction isolation level for the current session

postgres=#
postgres=# -- Set the default transaction isolation level for the current session:
postgres=#
postgres=# SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET
postgres=#
postgres=#