aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeWorktablescan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeWorktablescan.c')
-rw-r--r--src/backend/executor/nodeWorktablescan.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/backend/executor/nodeWorktablescan.c b/src/backend/executor/nodeWorktablescan.c
index 545747b2307..3c18a3eccc3 100644
--- a/src/backend/executor/nodeWorktablescan.c
+++ b/src/backend/executor/nodeWorktablescan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeWorktablescan.c,v 1.8 2009/09/27 21:10:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeWorktablescan.c,v 1.9 2009/10/26 02:26:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,12 +61,22 @@ WorkTableScanNext(WorkTableScanState *node)
return slot;
}
+/*
+ * WorkTableScanRecheck -- access method routine to recheck a tuple in EvalPlanQual
+ */
+static bool
+WorkTableScanRecheck(WorkTableScanState *node, TupleTableSlot *slot)
+{
+ /* nothing to check */
+ return true;
+}
+
/* ----------------------------------------------------------------
* ExecWorkTableScan(node)
*
* Scans the worktable sequentially and returns the next qualifying tuple.
- * It calls the ExecScan() routine and passes it the access method
- * which retrieves tuples sequentially.
+ * We call the ExecScan() routine and pass it the appropriate
+ * access method functions.
* ----------------------------------------------------------------
*/
TupleTableSlot *
@@ -106,10 +116,9 @@ ExecWorkTableScan(WorkTableScanState *node)
ExecAssignScanProjectionInfo(&node->ss);
}
- /*
- * use WorkTableScanNext as access method
- */
- return ExecScan(&node->ss, (ExecScanAccessMtd) WorkTableScanNext);
+ return ExecScan(&node->ss,
+ (ExecScanAccessMtd) WorkTableScanNext,
+ (ExecScanRecheckMtd) WorkTableScanRecheck);
}
@@ -203,7 +212,8 @@ void
ExecWorkTableScanReScan(WorkTableScanState *node, ExprContext *exprCtxt)
{
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
- node->ss.ps.ps_TupFromTlist = false;
+
+ ExecScanReScan(&node->ss);
/* No need (or way) to rescan if ExecWorkTableScan not called yet */
if (node->rustate)