diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-27 19:38:40 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-27 19:38:40 +0000 |
commit | be8300b18f26363c0b18c62fa884a6a62e26405e (patch) | |
tree | a44ac3f51d81a7616bd9c7912fa23a5e81c9d483 /src/backend/executor/nodeIndexscan.c | |
parent | f7f989c9907b181f1785c699e6384e6eba8ae9a5 (diff) | |
download | postgresql-be8300b18f26363c0b18c62fa884a6a62e26405e.tar.gz postgresql-be8300b18f26363c0b18c62fa884a6a62e26405e.zip |
Use Snapshot in heap access methods.
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 */ |