aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/builtins.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-08-23 10:30:52 -0400
committerRobert Haas <rhaas@postgresql.org>2016-08-23 10:30:52 -0400
commit86f31695f3b54211226949de519063bbf248e8c4 (patch)
tree982c2bdcb5b6453e51b1318ac54be75ecdc665c3 /src/include/utils/builtins.h
parentff36700c3ba2180047b4103de440ffaa34889b72 (diff)
downloadpostgresql-86f31695f3b54211226949de519063bbf248e8c4.tar.gz
postgresql-86f31695f3b54211226949de519063bbf248e8c4.zip
Add txid_current_ifassigned().
Add a variant of txid_current() that returns NULL if no transaction ID is assigned. This version can be used even on a standby server, although it will always return NULL since no transaction IDs can be assigned during recovery. Craig Ringer, per suggestion from Jim Nasby. Reviewed by Petr Jelinek and by me.
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r--src/include/utils/builtins.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 40e25c88247..2ae212a9c3f 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -1221,6 +1221,7 @@ extern Datum txid_snapshot_out(PG_FUNCTION_ARGS);
extern Datum txid_snapshot_recv(PG_FUNCTION_ARGS);
extern Datum txid_snapshot_send(PG_FUNCTION_ARGS);
extern Datum txid_current(PG_FUNCTION_ARGS);
+extern Datum txid_current_if_assigned(PG_FUNCTION_ARGS);
extern Datum txid_current_snapshot(PG_FUNCTION_ARGS);
extern Datum txid_snapshot_xmin(PG_FUNCTION_ARGS);
extern Datum txid_snapshot_xmax(PG_FUNCTION_ARGS);