Skip to content

Commit 0498a08

Browse files
committed
Improve confusing comment for HeapTupleSatisfiesNow, per gripe from Greg Stark.
1 parent fa6f9ce commit 0498a08

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/backend/utils/time/tqual.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Portions Copyright (c) 1994, Regents of the University of California
3333
*
3434
* IDENTIFICATION
35-
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.96 2006/09/03 15:59:39 tgl Exp $
35+
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.97 2006/09/15 16:39:32 tgl Exp $
3636
*
3737
*-------------------------------------------------------------------------
3838
*/
@@ -253,19 +253,18 @@ HeapTupleSatisfiesItself(HeapTupleHeader tuple, Buffer buffer)
253253
*
254254
* The satisfaction of "now" requires the following:
255255
*
256-
* ((Xmin == my-transaction && changed by the current transaction
257-
* Cmin != my-command && but not by this command, and
258-
* (Xmax is null || the row has not been deleted, or
259-
* (Xmax == my-transaction && it was deleted by the current transaction
260-
* Cmax != my-command))) but not by this command,
256+
* ((Xmin == my-transaction && inserted by the current transaction
257+
* Cmin < my-command && before this command, and
258+
* (Xmax is null || the row has not been deleted, or
259+
* (Xmax == my-transaction && it was deleted by the current transaction
260+
* Cmax >= my-command))) but not before this command,
261261
* || or
262-
*
263-
* (Xmin is committed && the row was modified by a committed transaction, and
262+
* (Xmin is committed && the row was inserted by a committed transaction, and
264263
* (Xmax is null || the row has not been deleted, or
265-
* (Xmax == my-transaction && the row is being deleted by this command, or
266-
* Cmax == my-command) ||
267-
* (Xmax is not committed && the row was deleted by another transaction
268-
* Xmax != my-transaction)))) that has not been committed
264+
* (Xmax == my-transaction && the row is being deleted by this transaction
265+
* Cmax >= my-command) || but it's not deleted "yet", or
266+
* (Xmax != my-transaction && the row was deleted by another transaction
267+
* Xmax is not committed)))) that has not been committed
269268
*
270269
* mao says 17 march 1993: the tests in this routine are correct;
271270
* if you think they're not, you're wrong, and you should think

0 commit comments

Comments
 (0)