diff options
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexscan.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 3354224a695..51308d41014 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.18 1998/06/15 19:28:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.19 1998/07/27 19:37:57 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -85,7 +85,8 @@ IndexNext(IndexScan *node) EState *estate; CommonScanState *scanstate; IndexScanState *indexstate; - ScanDirection direction; + ScanDirection direction; + Snapshot snapshot; int indexPtr; IndexScanDescPtr scanDescs; IndexScanDesc scandesc; @@ -101,6 +102,7 @@ IndexNext(IndexScan *node) */ estate = node->scan.plan.state; direction = estate->es_direction; + snapshot = estate->es_snapshot; scanstate = node->scan.scanstate; indexstate = node->indxstate; indexPtr = indexstate->iss_IndexPtr; @@ -122,7 +124,8 @@ IndexNext(IndexScan *node) */ while ((result = index_getnext(scandesc, direction)) != NULL) { - tuple = heap_fetch(heapRelation, false, &result->heap_iptr, &buffer); + tuple = heap_fetch(heapRelation, snapshot, + &result->heap_iptr, &buffer); /* be tidy */ pfree(result); @@ -920,6 +923,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent) (ScanKey) NULL, /* scan key */ 0, /* is index */ direction, /* scan direction */ + estate->es_snapshot, /* */ ¤tRelation, /* return: rel desc */ (Pointer *) ¤tScanDesc); /* return: scan desc */ @@ -958,6 +962,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent) scanKeys[i], /* scan key */ true, /* is index */ direction, /* scan direction */ + estate->es_snapshot, &(relationDescs[i]), /* return: rel desc */ (Pointer *) &(scanDescs[i])); /* return: scan desc */ |