diff options
| author | Tom Lane | 2002-02-14 15:24:10 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-02-14 15:24:10 +0000 |
| commit | 3576820e7852ab20d552fe5aa7abb2847db62f6f (patch) | |
| tree | 207f056de4c5e95b5000b119c4d6e0d8b0380ffa /src/include | |
| parent | 13920423466a345e832ed844e9513ad2eed43731 (diff) | |
Ensure that a cursor is scanned under the same scanCommandId it was
originally created with, so that the set of visible tuples does not
change as a result of other activity. This essentially makes PG cursors
INSENSITIVE per the SQL92 definition. See bug report of 13-Feb-02.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/portal.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index 395409ad205..9198b21feb9 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.31 2001/11/05 17:46:36 momjian Exp $ + * $Id: portal.h,v 1.32 2002/02/14 15:24:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -31,6 +31,7 @@ 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 */ @@ -48,8 +49,9 @@ typedef struct PortalData */ #define PortalGetQueryDesc(portal) ((portal)->queryDesc) #define PortalGetTupleDesc(portal) ((portal)->attinfo) -#define PortalGetState(portal) ((portal)->state) -#define PortalGetHeapMemory(portal) ((portal)->heap) +#define PortalGetCommandId(portal) ((portal)->commandId) +#define PortalGetState(portal) ((portal)->state) +#define PortalGetHeapMemory(portal) ((portal)->heap) /* * estimate of the maximum number of open portals a user would have, |
