From 7326e78c4249393359edce09f555aaa049be2a80 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 23 Aug 2001 23:06:38 +0000 Subject: Ensure that all TransactionId comparisons are encapsulated in macros (TransactionIdPrecedes, TransactionIdFollows, etc). First step on the way to transaction ID wrap solution ... --- src/include/postgres.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/include/postgres.h') diff --git a/src/include/postgres.h b/src/include/postgres.h index 1502c84a4c6..c40db19dab2 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.50 2001/08/10 18:57:41 tgl Exp $ + * $Id: postgres.h,v 1.51 2001/08/23 23:06:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -261,6 +261,34 @@ typedef Datum *DatumPtr; #define ObjectIdGetDatum(X) ((Datum) SET_4_BYTES(X)) +/* + * DatumGetTransactionId + * Returns transaction identifier value of a datum. + */ + +#define DatumGetTransactionId(X) ((TransactionId) GET_4_BYTES(X)) + +/* + * TransactionIdGetDatum + * Returns datum representation for a transaction identifier. + */ + +#define TransactionIdGetDatum(X) ((Datum) SET_4_BYTES((X))) + +/* + * DatumGetCommandId + * Returns command identifier value of a datum. + */ + +#define DatumGetCommandId(X) ((CommandId) GET_4_BYTES(X)) + +/* + * CommandIdGetDatum + * Returns datum representation for a command identifier. + */ + +#define CommandIdGetDatum(X) ((Datum) SET_4_BYTES(X)) + /* * DatumGetPointer * Returns pointer value of a datum. -- cgit v1.2.3