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/backend/utils/time/tqual.c | |
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/backend/utils/time/tqual.c')
-rw-r--r-- | src/backend/utils/time/tqual.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index 35113a36228..c5fe5fd5162 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.39 2001/07/16 22:43:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.40 2001/08/23 23:06:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -531,15 +531,15 @@ HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot) * when... */ - if (tuple->t_xmin >= snapshot->xmax) + if (TransactionIdFollowsOrEquals(tuple->t_xmin, snapshot->xmax)) return false; - if (tuple->t_xmin >= snapshot->xmin) + if (TransactionIdFollowsOrEquals(tuple->t_xmin, snapshot->xmin)) { uint32 i; for (i = 0; i < snapshot->xcnt; i++) { - if (tuple->t_xmin == snapshot->xip[i]) + if (TransactionIdEquals(tuple->t_xmin, snapshot->xip[i])) return false; } } @@ -571,15 +571,15 @@ HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot) tuple->t_infomask |= HEAP_XMAX_COMMITTED; } - if (tuple->t_xmax >= snapshot->xmax) + if (TransactionIdFollowsOrEquals(tuple->t_xmax, snapshot->xmax)) return true; - if (tuple->t_xmax >= snapshot->xmin) + if (TransactionIdFollowsOrEquals(tuple->t_xmax, snapshot->xmin)) { uint32 i; for (i = 0; i < snapshot->xcnt; i++) { - if (tuple->t_xmax == snapshot->xip[i]) + if (TransactionIdEquals(tuple->t_xmax, snapshot->xip[i])) return true; } } |