1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Renumber SnapshotNow and the other special snapshot codes so that

((Snapshot) NULL) can no longer be confused with a valid snapshot,
as per my recent suggestion.  Define a macro InvalidSnapshot for 0.
Use InvalidSnapshot instead of SnapshotAny as the do-nothing special
case for heap_update and heap_delete crosschecks; this seems a little
cleaner even though the behavior is really the same.
This commit is contained in:
Tom Lane
2004-09-11 18:28:34 +00:00
parent 9835944e54
commit 493f72606b
5 changed files with 38 additions and 20 deletions

View File

@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.236 2004/08/29 05:06:42 momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.237 2004/09/11 18:28:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -176,7 +176,7 @@ ExecutorStart(QueryDesc *queryDesc, bool useCurrentSnapshot, bool explainOnly)
{
/* normal query --- use query snapshot, no crosscheck */
estate->es_snapshot = CopyQuerySnapshot();
estate->es_crosscheck_snapshot = SnapshotAny;
estate->es_crosscheck_snapshot = InvalidSnapshot;
}
/*