aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSeqscan.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-08-19 02:04:17 +0000
committerBruce Momjian <bruce@momjian.us>1998-08-19 02:04:17 +0000
commit7971539020a344dce3a8b3b9b93ff4f10e2f823a (patch)
tree8dca0af0d3ac8d431bff8c0dec793fe9733a1ee9 /src/backend/executor/nodeSeqscan.c
parent31de2c9461dff3284ad61084c73eba093fa3f68e (diff)
downloadpostgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.tar.gz
postgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.zip
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
Diffstat (limited to 'src/backend/executor/nodeSeqscan.c')
-rw-r--r--src/backend/executor/nodeSeqscan.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c
index 1ff4f1f13eb..80bdef82937 100644
--- a/src/backend/executor/nodeSeqscan.c
+++ b/src/backend/executor/nodeSeqscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.11 1998/07/27 19:37:57 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.12 1998/08/19 02:02:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,7 +55,6 @@ SeqNext(SeqScan *node)
EState *estate;
ScanDirection direction;
TupleTableSlot *slot;
- Buffer buffer;
/* ----------------
* get information from the estate and scan state
@@ -70,9 +69,7 @@ SeqNext(SeqScan *node)
* get the next tuple from the access methods
* ----------------
*/
- tuple = heap_getnext(scandesc, /* scan desc */
- ScanDirectionIsBackward(direction), /* backward flag */
- &buffer); /* return: buffer */
+ tuple = heap_getnext(scandesc, ScanDirectionIsBackward(direction));
/* ----------------
* save the tuple and the buffer returned to us by the access methods
@@ -86,8 +83,7 @@ SeqNext(SeqScan *node)
slot = ExecStoreTuple(tuple,/* tuple to store */
slot, /* slot to store in */
- buffer, /* buffer associated with this
- * tuple */
+ scandesc->rs_cbuf,/* buffer associated with this tuple */
false); /* don't pfree this pointer */
/* ----------------
@@ -364,8 +360,8 @@ ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent)
CommonScanState *scanstate;
EState *estate;
Plan *outerPlan;
- Relation rdesc;
- HeapScanDesc sdesc;
+ Relation rel;
+ HeapScanDesc scan;
ScanDirection direction;
scanstate = node->scanstate;
@@ -380,11 +376,11 @@ ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent)
else
{
/* otherwise, we are scanning a relation */
- rdesc = scanstate->css_currentRelation;
- sdesc = scanstate->css_currentScanDesc;
+ rel = scanstate->css_currentRelation;
+ scan = scanstate->css_currentScanDesc;
direction = estate->es_direction;
- sdesc = ExecReScanR(rdesc, sdesc, direction, 0, NULL);
- scanstate->css_currentScanDesc = sdesc;
+ scan = ExecReScanR(rel, scan, direction, 0, NULL);
+ scanstate->css_currentScanDesc = scan;
}
}
@@ -399,7 +395,7 @@ ExecSeqMarkPos(SeqScan *node)
{
CommonScanState *scanstate;
Plan *outerPlan;
- HeapScanDesc sdesc;
+ HeapScanDesc scan;
scanstate = node->scanstate;
@@ -421,8 +417,8 @@ ExecSeqMarkPos(SeqScan *node)
*
* ----------------
*/
- sdesc = scanstate->css_currentScanDesc;
- heap_markpos(sdesc);
+ scan = scanstate->css_currentScanDesc;
+ heap_markpos(scan);
return;
}
@@ -438,7 +434,7 @@ ExecSeqRestrPos(SeqScan *node)
{
CommonScanState *scanstate;
Plan *outerPlan;
- HeapScanDesc sdesc;
+ HeapScanDesc scan;
scanstate = node->scanstate;
@@ -459,6 +455,6 @@ ExecSeqRestrPos(SeqScan *node)
* position using the access methods..
* ----------------
*/
- sdesc = scanstate->css_currentScanDesc;
- heap_restrpos(sdesc);
+ scan = scanstate->css_currentScanDesc;
+ heap_restrpos(scan);
}