]> git.openstreetmap.org Git - rails.git/commitdiff
Update xid_to_int4 to use postgres version 1 calling convention
authorTom Hughes <tom@compton.nu>
Sat, 28 Apr 2018 14:15:53 +0000 (15:15 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 28 Apr 2018 14:16:46 +0000 (15:16 +0100)
db/functions/xid_to_int4.c

index d654bf26942855a992a133c65c071247fbe03f22..e312b5f157cfd36e7013d64fea2293b48ea9fcda 100644 (file)
@@ -1,11 +1,16 @@
 #include <postgres.h>
 #include <fmgr.h>
 
 #include <postgres.h>
 #include <fmgr.h>
 
-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:
  *
 /*
  * To bind this into PGSQL, try something like:
  *