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

Go to the source code of this file.

Functions

GroupStateExecInitGroup (Group *node, EState *estate, int eflags)
 
void ExecEndGroup (GroupState *node)
 
void ExecReScanGroup (GroupState *node)
 

Function Documentation

◆ ExecEndGroup()

void ExecEndGroup ( GroupState node)
extern

Definition at line 227 of file nodeGroup.c.

228{
230
233}
void ExecEndNode(PlanState *node)
#define outerPlanState(node)
Definition execnodes.h:1273
#define outerPlan(node)
Definition plannodes.h:265

References ExecEndNode(), outerPlan, and outerPlanState.

Referenced by ExecEndNode().

◆ ExecInitGroup()

GroupState * ExecInitGroup ( Group node,
EState estate,
int  eflags 
)
extern

Definition at line 162 of file nodeGroup.c.

163{
165 const TupleTableSlotOps *tts_ops;
166
167 /* check for unsupported flags */
169
170 /*
171 * create state structure
172 */
174 grpstate->ss.ps.plan = (Plan *) node;
175 grpstate->ss.ps.state = estate;
176 grpstate->ss.ps.ExecProcNode = ExecGroup;
177 grpstate->grp_done = false;
178
179 /*
180 * create expression context
181 */
182 ExecAssignExprContext(estate, &grpstate->ss.ps);
183
184 /*
185 * initialize child nodes
186 */
187 outerPlanState(grpstate) = ExecInitNode(outerPlan(node), estate, eflags);
188
189 /*
190 * Initialize scan slot and type.
191 */
193 ExecCreateScanSlotFromOuterPlan(estate, &grpstate->ss, tts_ops);
194
195 /*
196 * Initialize result slot, type and projection.
197 */
200
201 /*
202 * initialize child expressions
203 */
204 grpstate->ss.ps.qual =
206
207 /*
208 * Precompute fmgr lookup data for inner loop
209 */
210 grpstate->eqfunction =
212 node->numCols,
213 node->grpColIdx,
214 node->grpOperators,
215 node->grpCollations,
216 &grpstate->ss.ps);
217
218 return grpstate;
219}
#define Assert(condition)
Definition c.h:945
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition execExpr.c:250
ExprState * execTuplesMatchPrepare(TupleDesc desc, int numCols, const AttrNumber *keyColIdx, const Oid *eqOperators, const Oid *collations, PlanState *parent)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
const TupleTableSlotOps TTSOpsVirtual
Definition execTuples.c:84
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
TupleDesc ExecGetResultType(PlanState *planstate)
Definition execUtils.c:500
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition execUtils.c:709
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition execUtils.c:490
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition execUtils.c:588
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition execUtils.c:509
#define EXEC_FLAG_BACKWARD
Definition executor.h:70
#define EXEC_FLAG_MARK
Definition executor.h:71
static TupleTableSlot * ExecGroup(PlanState *pstate)
Definition nodeGroup.c:37
#define makeNode(_type_)
Definition nodes.h:161
static int fb(int x)
int numCols
Definition plannodes.h:1181
Plan plan
Definition plannodes.h:1178
List * qual
Definition plannodes.h:235

References Assert, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecAssignProjectionInfo(), ExecCreateScanSlotFromOuterPlan(), ExecGetResultSlotOps(), ExecGetResultType(), ExecGroup(), ExecInitNode(), ExecInitQual(), ExecInitResultTupleSlotTL(), execTuplesMatchPrepare(), fb(), makeNode, Group::numCols, outerPlan, outerPlanState, Group::plan, Plan::qual, and TTSOpsVirtual.

Referenced by ExecInitNode().

◆ ExecReScanGroup()

void ExecReScanGroup ( GroupState node)
extern

Definition at line 236 of file nodeGroup.c.

237{
239
240 node->grp_done = false;
241 /* must clear first tuple */
243
244 /*
245 * if chgParam of subnode is not null then plan will be re-scanned by
246 * first ExecProcNode.
247 */
248 if (outerPlan->chgParam == NULL)
250}
void ExecReScan(PlanState *node)
Definition execAmi.c:78
ScanState ss
Definition execnodes.h:2378
bool grp_done
Definition execnodes.h:2380
TupleTableSlot * ss_ScanTupleSlot
Definition execnodes.h:1636
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition tuptable.h:476

References ExecClearTuple(), ExecReScan(), fb(), GroupState::grp_done, outerPlan, outerPlanState, GroupState::ss, and ScanState::ss_ScanTupleSlot.

Referenced by ExecReScan().