Skip to content

Whether a transaction ID can be extracted from a connection object. #1377

Answered by dvarrazzo
JangKyumin asked this question in Q&A
Discussion options

You must be logged in to vote

The connection itself doesn't receive a transaction id you can extract from the server.

You can use a function such as pg_current_xact_id() and return it together with your result, or use a form such as INSERT INTO.... RETURNING pg_current_xact_id() maybe?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JangKyumin
Comment options

Answer selected by JangKyumin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants