summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xid.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-08-23 23:06:38 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-08-23 23:06:38 +0000
commit7326e78c4249393359edce09f555aaa049be2a80 (patch)
treed1fc53198588ee98884524a28b13105a6b296952 /src/backend/access/transam/xid.c
parent29ec29ffac53b50870a55b88f96b462835e9042a (diff)
Ensure that all TransactionId comparisons are encapsulated in macros
(TransactionIdPrecedes, TransactionIdFollows, etc). First step on the way to transaction ID wrap solution ...
Diffstat (limited to 'src/backend/access/transam/xid.c')
-rw-r--r--src/backend/access/transam/xid.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/access/transam/xid.c b/src/backend/access/transam/xid.c
index 9ec40bb2a93..689fc33ceaf 100644
--- a/src/backend/access/transam/xid.c
+++ b/src/backend/access/transam/xid.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xid.c,v 1.31 2001/07/12 04:11:13 tgl Exp $
+ * $Id: xid.c,v 1.32 2001/08/23 23:06:37 tgl Exp $
*
* OLD COMMENTS
* XXX WARNING
@@ -23,11 +23,8 @@
#include "access/xact.h"
-/*
- * TransactionId is typedef'd as uint32, so...
- */
-#define PG_GETARG_TRANSACTIONID(n) PG_GETARG_UINT32(n)
-#define PG_RETURN_TRANSACTIONID(x) PG_RETURN_UINT32(x)
+#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
+#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
Datum
@@ -42,7 +39,6 @@ Datum
xidout(PG_FUNCTION_ARGS)
{
TransactionId transactionId = PG_GETARG_TRANSACTIONID(0);
-
/* maximum 32 bit unsigned integer representation takes 10 chars */
char *representation = palloc(11);