1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Move responsibility for setting QuerySnapshot for utility statements

into postgres.c; make sure it happens for all cases that seem to need it.
Perhaps it would be better to explicitly exclude just a few utility
statement types from setting a snapshot?
This commit is contained in:
Tom Lane
2002-10-08 17:17:19 +00:00
parent 5fc32fbf87
commit 56ece37384
3 changed files with 35 additions and 20 deletions

View File

@@ -16,7 +16,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.60 2002/09/04 20:31:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.61 2002/10/08 17:17:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -977,8 +977,8 @@ CopyQuerySnapshot(void)
{
Snapshot snapshot;
if (QuerySnapshot == NULL) /* should be set already, but... */
SetQuerySnapshot();
if (QuerySnapshot == NULL) /* should be set beforehand */
elog(ERROR, "CopyQuerySnapshot: no snapshot has been set");
snapshot = (Snapshot) palloc(sizeof(SnapshotData));
memcpy(snapshot, QuerySnapshot, sizeof(SnapshotData));