Bor*_*rys 5 postgresql transactions plpgsql identifier
有没有办法从SQL查询或plpgsql函数主体获取transactionid(xid)?
PostgreSQL 9.3的版本
Ric*_*ton 6
http://www.postgresql.org/docs/9.3/static/functions-info.html#FUNCTIONS-TXID-SNAPSHOT
txid_current() 可能就是您所追求的。
txid_current()
Erw*_*ter 5
在 PostgreSQL 10 或更高版本中请考虑txid_current_if_assigned()改为。手册:
txid_current_if_assigned()
相同,txid_current()但如果尚未分配,则返回 null,而不是分配新的事务 ID
归档时间:
11 年,6 月 前
查看次数:
2545 次
最近记录:
7 年,5 月 前