diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-08-23 23:06:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-08-23 23:06:38 +0000 |
commit | 7326e78c4249393359edce09f555aaa049be2a80 (patch) | |
tree | d1fc53198588ee98884524a28b13105a6b296952 /src/include/postgres.h | |
parent | 29ec29ffac53b50870a55b88f96b462835e9042a (diff) | |
download | postgresql-7326e78c4249393359edce09f555aaa049be2a80.tar.gz postgresql-7326e78c4249393359edce09f555aaa049be2a80.zip |
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/include/postgres.h')
-rw-r--r-- | src/include/postgres.h | 30 |
1 files changed, 29 insertions, 1 deletions
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 $ * *------------------------------------------------------------------------- */ @@ -262,6 +262,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. */ |