aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/portal.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-05-21 22:05:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-05-21 22:05:55 +0000
commit959e61e917a802074e257d4bec13ee04ab4822ff (patch)
tree880e848a4b330587976ae3502164dc6e0c874ca4 /src/include/utils/portal.h
parent0a2682445ebad57f911ed52f0634d1520164c319 (diff)
downloadpostgresql-959e61e917a802074e257d4bec13ee04ab4822ff.tar.gz
postgresql-959e61e917a802074e257d4bec13ee04ab4822ff.zip
Remove global variable scanCommandId in favor of storing a command ID
in snapshots, per my proposal of a few days ago. Also, tweak heapam.c routines (heap_insert, heap_update, heap_delete, heap_mark4update) to be passed the command ID to use, instead of doing GetCurrentCommandID. For catalog updates they'll still get passed current command ID, but for updates generated from the main executor they'll get passed the command ID saved in the snapshot the query is using. This should fix some corner cases associated with functions and triggers that advance current command ID while an outer query is still in progress.
Diffstat (limited to 'src/include/utils/portal.h')
-rw-r--r--src/include/utils/portal.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h
index 9198b21feb9..491106fac37 100644
--- a/src/include/utils/portal.h
+++ b/src/include/utils/portal.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: portal.h,v 1.32 2002/02/14 15:24:10 tgl Exp $
+ * $Id: portal.h,v 1.33 2002/05/21 22:05:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,6 @@ typedef struct PortalData
MemoryContext heap; /* subsidiary memory */
QueryDesc *queryDesc; /* Info about query associated with portal */
TupleDesc attinfo;
- CommandId commandId; /* Command counter value for query */
EState *state; /* Execution state of query */
bool atStart; /* T => fetch backwards is not allowed */
bool atEnd; /* T => fetch forwards is not allowed */
@@ -49,7 +48,6 @@ typedef struct PortalData
*/
#define PortalGetQueryDesc(portal) ((portal)->queryDesc)
#define PortalGetTupleDesc(portal) ((portal)->attinfo)
-#define PortalGetCommandId(portal) ((portal)->commandId)
#define PortalGetState(portal) ((portal)->state)
#define PortalGetHeapMemory(portal) ((portal)->heap)