]> git.openstreetmap.org Git - rails.git/blob - db/functions/xid_to_int4.c
Correct comment.
[rails.git] / db / functions / xid_to_int4.c
1 #ifndef USE_MYSQL
2 #ifndef USE_PGSQL
3 #error One of USE_MYSQL or USE_PGSQL must be defined
4 #endif
5 #endif
6
7 #ifdef USE_PGSQL
8 #ifdef USE_MYSQL
9 #error ONLY one of USE_MYSQL and USE_PGSQL should be defined
10 #endif
11
12 #include <postgres.h>
13 #include <fmgr.h>
14
15 int xid_to_int4(TransactionId xid)
16 {
17    return xid;
18 }
19
20 /*
21  * To bind this into PGSQL, try something like:
22  *
23  * CREATE FUNCTION xid_to_int4(xid) RETURNS int4
24  *  AS '/path/to/rails-port/db/functions/libpgosm', 'xid_to_int4'
25  *  LANGUAGE C IMMUTABLE STRICT;
26  *
27  * (without all the *s)
28  */
29
30 #endif