From cb0c185ce6515b1e9465781667886c0543531c4d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 28 Apr 2018 15:15:53 +0100 Subject: [PATCH] Update xid_to_int4 to use postgres version 1 calling convention --- db/functions/xid_to_int4.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db/functions/xid_to_int4.c b/db/functions/xid_to_int4.c index d654bf269..e312b5f15 100644 --- a/db/functions/xid_to_int4.c +++ b/db/functions/xid_to_int4.c @@ -1,11 +1,16 @@ #include #include -int xid_to_int4(TransactionId xid) +Datum +xid_to_int4(PG_FUNCTION_ARGS) { - return xid; + TransactionId xid = PG_GETARG_INT32(0); + + PG_RETURN_INT32(xid); } +PG_FUNCTION_INFO_V1(xid_to_int4); + /* * To bind this into PGSQL, try something like: * -- 2.39.5