The SHOW TRANSACTION statement shows you the current transaction’s isolation level or priority.

When run outside of a transaction, SHOW TRANSACTION returns the default isolation level or priority.

Synopsis

SHOW TRANSACTION ISOLATION LEVEL PRIORITY STATUS

Required Privileges

No privileges are required to view transaction isolation level or priority.

Examples

Show the Transaction’s Isolation Level

> BEGIN;

> SET TRANSACTION ISOLATION LEVEL SNAPSHOT, PRIORITY HIGH;

> SHOW TRANSACTION ISOLATION LEVEL;
+-----------------------------+
| transaction isolation level |
+-----------------------------+
| SNAPSHOT                    |
+-----------------------------+
(1 row)

Show the Transaction’s Priority

> BEGIN;

> SET TRANSACTION ISOLATION LEVEL SNAPSHOT, PRIORITY HIGH;

> SHOW TRANSACTION PRIORITY;
+----------------------+
| transaction priority |
+----------------------+
| HIGH                 |
+----------------------+
(1 row)

See Also



Yes No