pg_txn_status
pg_txn_status · One-byte txn_status data type for storing transaction state values.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100292 | pg_txn_status | pg_txn_status | 0.1 | TYPE | Unknown | C |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
Usage
Sources:
pg_txn_status version 0.1 provides a one-byte txn_status type for storing one of six application-defined transaction-state labels. It does not inspect PostgreSQL transactions or WAL.
Core Workflow
Accepted, case-sensitive values are begin, prepare, commit, rollback, complete, and incomplete. Any other input raises an error.
Objects and Caveats
The extension defines input/output and binary send/receive functions plus equality =. It does not define inequality, ordering, hashing, a B-tree class, or a transaction-management API.
Use a native PostgreSQL enum or a reference table when schema evolution, ordering, indexes, or maintained compatibility matter more than the one-byte representation. The upstream project is abandoned and uses old C extension interfaces; validate compilation, dump/restore, replication, and on-disk compatibility on the exact PostgreSQL release before storing durable data.