Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting transactionid(xid) from SQL

Is there a way to get transactionid(xid) from SQL query, or from plpgsql function body?

version of PostgreSQL 9.3

like image 520
Borys Avatar asked Mar 05 '14 12:03

Borys


1 Answers

http://www.postgresql.org/docs/9.3/static/functions-info.html#FUNCTIONS-TXID-SNAPSHOT

txid_current() is probably what you are after.

like image 189
Richard Huxton Avatar answered Sep 28 '22 17:09

Richard Huxton