PostgreSQL/Transaction/Transaction Isolation
Содержание
Displays the current transaction isolation level
<source lang="sql">
postgres=# -- Displays the current transaction isolation level: postgres=# postgres=# SHOW TRANSACTION ISOLATION LEVEL;
transaction_isolation
read committed
(1 row) postgres=# postgres=#
</source>
Sets the constraint evaluation mode to IMMEDIATE for all constraints within the transaction
<source lang="sql">
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=#
</source>
Sets the transaction isolation level to SERIALIZABLE for the current transaction
<source lang="sql">
postgres=# postgres=# -- Sets the transaction isolation level to SERIALIZABLE for the current transaction: postgres=# postgres=# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET postgres=# postgres=#
</source>
Set the default transaction isolation level for the current session
<source lang="sql">
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=#
</source>