pg_current_xact_id () → xid8Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.
Functions / System Information Functions And Operators
pg_current_xact_id
Read the PG 18 manualReturns the current transaction's ID.
Reading PG 18current·documented in 8 of 27 versions, 13 to 20
Signatures & examples
Definition snapshot: b7bd9cda · English manual source