PostgreSQL Source Code git master
Loading...
Searching...
No Matches
nodeWorktablescan.h File Reference
#include "nodes/execnodes.h"
Include dependency graph for nodeWorktablescan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

WorkTableScanStateExecInitWorkTableScan (WorkTableScan *node, EState *estate, int eflags)
 
void ExecReScanWorkTableScan (WorkTableScanState *node)
 

Function Documentation

◆ ExecInitWorkTableScan()

WorkTableScanState * ExecInitWorkTableScan ( WorkTableScan node,
EState estate,
int  eflags 
)
extern

Definition at line 130 of file nodeWorktablescan.c.

131{
133
134 /* check for unsupported flags */
136
137 /*
138 * WorkTableScan should not have any children.
139 */
140 Assert(outerPlan(node) == NULL);
141 Assert(innerPlan(node) == NULL);
142
143 /*
144 * create new WorkTableScanState for node
145 */
147 scanstate->ss.ps.plan = (Plan *) node;
148 scanstate->ss.ps.state = estate;
149 scanstate->ss.ps.ExecProcNode = ExecWorkTableScan;
150 scanstate->rustate = NULL; /* we'll set this later */
151
152 /*
153 * Miscellaneous initialization
154 *
155 * create expression context for node
156 */
157 ExecAssignExprContext(estate, &scanstate->ss.ps);
158
159 /*
160 * tuple table initialization
161 */
163
164 /* signal that return type is not yet known */
165 scanstate->ss.ps.resultopsset = true;
166 scanstate->ss.ps.resultopsfixed = false;
167
169
170 /*
171 * initialize child expressions
172 */
173 scanstate->ss.ps.qual =
174 ExecInitQual(node->scan.plan.qual, (PlanState *) scanstate);
175
176 /*
177 * Do not yet initialize projection info, see ExecWorkTableScan() for
178 * details.
179 */
180
181 return scanstate;
182}
#define Assert(condition)
Definition c.h:873
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition execExpr.c:229
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecInitResultTypeTL(PlanState *planstate)
const TupleTableSlotOps TTSOpsMinimalTuple
Definition execTuples.c:86
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition execUtils.c:485
#define EXEC_FLAG_BACKWARD
Definition executor.h:69
#define EXEC_FLAG_MARK
Definition executor.h:70
static TupleTableSlot * ExecWorkTableScan(PlanState *pstate)
#define makeNode(_type_)
Definition nodes.h:161
#define innerPlan(node)
Definition plannodes.h:260
#define outerPlan(node)
Definition plannodes.h:261
static int fb(int x)

References Assert, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecWorkTableScan(), fb(), innerPlan, makeNode, outerPlan, WorkTableScan::scan, and TTSOpsMinimalTuple.

Referenced by ExecInitNode().

◆ ExecReScanWorkTableScan()

void ExecReScanWorkTableScan ( WorkTableScanState node)
extern

Definition at line 191 of file nodeWorktablescan.c.

192{
193 if (node->ss.ps.ps_ResultTupleSlot)
195
196 ExecScanReScan(&node->ss);
197
198 /* No need (or way) to rescan if ExecWorkTableScan not called yet */
199 if (node->rustate)
201}
void ExecScanReScan(ScanState *node)
Definition execScan.c:108
TupleTableSlot * ps_ResultTupleSlot
Definition execnodes.h:1205
Tuplestorestate * working_table
Definition execnodes.h:1570
PlanState ps
Definition execnodes.h:1623
RecursiveUnionState * rustate
Definition execnodes.h:2077
void tuplestore_rescan(Tuplestorestate *state)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition tuptable.h:457

References ExecClearTuple(), ExecScanReScan(), ScanState::ps, PlanState::ps_ResultTupleSlot, WorkTableScanState::rustate, WorkTableScanState::ss, tuplestore_rescan(), and RecursiveUnionState::working_table.

Referenced by ExecReScan().