diff options
Diffstat (limited to 'src/include/utils/tqual.h')
-rw-r--r-- | src/include/utils/tqual.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index bfd51cb72e6..5e3efa17967 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/tqual.h,v 1.59 2005/10/15 02:49:46 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/tqual.h,v 1.60 2005/11/26 03:03:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -55,6 +55,15 @@ typedef SnapshotData *Snapshot; extern DLLIMPORT Snapshot SnapshotDirty; +/* This macro encodes the knowledge of which snapshots are MVCC-safe */ +#define IsMVCCSnapshot(snapshot) \ + ((snapshot) != SnapshotNow && \ + (snapshot) != SnapshotSelf && \ + (snapshot) != SnapshotAny && \ + (snapshot) != SnapshotToast && \ + (snapshot) != SnapshotDirty) + + extern DLLIMPORT Snapshot SerializableSnapshot; extern DLLIMPORT Snapshot LatestSnapshot; extern DLLIMPORT Snapshot ActiveSnapshot; @@ -69,8 +78,9 @@ extern TransactionId RecentGlobalXmin; * True iff heap tuple satisfies a time qual. * * Notes: - * Assumes heap tuple is valid. - * Beware of multiple evaluations of snapshot argument. + * Assumes heap tuple is valid. + * Beware of multiple evaluations of snapshot argument. + * Hint bits in the HeapTuple's t_infomask may be updated as a side effect. */ #define HeapTupleSatisfiesVisibility(tuple, snapshot, buffer) \ ((snapshot) == SnapshotNow ? \ |