PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
execProcnode.c
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * execProcnode.c
4  * contains dispatch functions which call the appropriate "initialize",
5  * "get a tuple", and "cleanup" routines for the given node type.
6  * If the node has children, then it will presumably call ExecInitNode,
7  * ExecProcNode, or ExecEndNode on its subnodes and do the appropriate
8  * processing.
9  *
10  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
11  * Portions Copyright (c) 1994, Regents of the University of California
12  *
13  *
14  * IDENTIFICATION
15  * src/backend/executor/execProcnode.c
16  *
17  *-------------------------------------------------------------------------
18  */
19 /*
20  * INTERFACE ROUTINES
21  * ExecInitNode - initialize a plan node and its subplans
22  * ExecProcNode - get a tuple by executing the plan node
23  * ExecEndNode - shut down a plan node and its subplans
24  *
25  * NOTES
26  * This used to be three files. It is now all combined into
27  * one file so that it is easier to keep ExecInitNode, ExecProcNode,
28  * and ExecEndNode in sync when new nodes are added.
29  *
30  * EXAMPLE
31  * Suppose we want the age of the manager of the shoe department and
32  * the number of employees in that department. So we have the query:
33  *
34  * select DEPT.no_emps, EMP.age
35  * from DEPT, EMP
36  * where EMP.name = DEPT.mgr and
37  * DEPT.name = "shoe"
38  *
39  * Suppose the planner gives us the following plan:
40  *
41  * Nest Loop (DEPT.mgr = EMP.name)
42  * / \
43  * / \
44  * Seq Scan Seq Scan
45  * DEPT EMP
46  * (name = "shoe")
47  *
48  * ExecutorStart() is called first.
49  * It calls InitPlan() which calls ExecInitNode() on
50  * the root of the plan -- the nest loop node.
51  *
52  * * ExecInitNode() notices that it is looking at a nest loop and
53  * as the code below demonstrates, it calls ExecInitNestLoop().
54  * Eventually this calls ExecInitNode() on the right and left subplans
55  * and so forth until the entire plan is initialized. The result
56  * of ExecInitNode() is a plan state tree built with the same structure
57  * as the underlying plan tree.
58  *
59  * * Then when ExecutorRun() is called, it calls ExecutePlan() which calls
60  * ExecProcNode() repeatedly on the top node of the plan state tree.
61  * Each time this happens, ExecProcNode() will end up calling
62  * ExecNestLoop(), which calls ExecProcNode() on its subplans.
63  * Each of these subplans is a sequential scan so ExecSeqScan() is
64  * called. The slots returned by ExecSeqScan() may contain
65  * tuples which contain the attributes ExecNestLoop() uses to
66  * form the tuples it returns.
67  *
68  * * Eventually ExecSeqScan() stops returning tuples and the nest
69  * loop join ends. Lastly, ExecutorEnd() calls ExecEndNode() which
70  * calls ExecEndNestLoop() which in turn calls ExecEndNode() on
71  * its subplans which result in ExecEndSeqScan().
72  *
73  * This should show how the executor works by having
74  * ExecInitNode(), ExecProcNode() and ExecEndNode() dispatch
75  * their work to the appropriate node support routines which may
76  * in turn call these routines themselves on their subplans.
77  */
78 #include "postgres.h"
79 
80 #include "executor/executor.h"
81 #include "executor/nodeAgg.h"
82 #include "executor/nodeAppend.h"
83 #include "executor/nodeBitmapAnd.h"
86 #include "executor/nodeBitmapOr.h"
87 #include "executor/nodeCtescan.h"
88 #include "executor/nodeCustom.h"
91 #include "executor/nodeGather.h"
92 #include "executor/nodeGroup.h"
93 #include "executor/nodeHash.h"
94 #include "executor/nodeHashjoin.h"
96 #include "executor/nodeIndexscan.h"
97 #include "executor/nodeLimit.h"
98 #include "executor/nodeLockRows.h"
99 #include "executor/nodeMaterial.h"
101 #include "executor/nodeMergejoin.h"
103 #include "executor/nodeNestloop.h"
104 #include "executor/nodeProjectSet.h"
106 #include "executor/nodeResult.h"
107 #include "executor/nodeSamplescan.h"
108 #include "executor/nodeSeqscan.h"
109 #include "executor/nodeSetOp.h"
110 #include "executor/nodeSort.h"
111 #include "executor/nodeSubplan.h"
113 #include "executor/nodeTidscan.h"
114 #include "executor/nodeUnique.h"
115 #include "executor/nodeValuesscan.h"
116 #include "executor/nodeWindowAgg.h"
118 #include "nodes/nodeFuncs.h"
119 #include "miscadmin.h"
120 
121 
122 /* ------------------------------------------------------------------------
123  * ExecInitNode
124  *
125  * Recursively initializes all the nodes in the plan tree rooted
126  * at 'node'.
127  *
128  * Inputs:
129  * 'node' is the current node of the plan produced by the query planner
130  * 'estate' is the shared execution state for the plan tree
131  * 'eflags' is a bitwise OR of flag bits described in executor.h
132  *
133  * Returns a PlanState node corresponding to the given Plan node.
134  * ------------------------------------------------------------------------
135  */
136 PlanState *
137 ExecInitNode(Plan *node, EState *estate, int eflags)
138 {
139  PlanState *result;
140  List *subps;
141  ListCell *l;
142 
143  /*
144  * do nothing when we get to the end of a leaf on tree.
145  */
146  if (node == NULL)
147  return NULL;
148 
149  switch (nodeTag(node))
150  {
151  /*
152  * control nodes
153  */
154  case T_Result:
155  result = (PlanState *) ExecInitResult((Result *) node,
156  estate, eflags);
157  break;
158 
159  case T_ProjectSet:
160  result = (PlanState *) ExecInitProjectSet((ProjectSet *) node,
161  estate, eflags);
162  break;
163 
164  case T_ModifyTable:
165  result = (PlanState *) ExecInitModifyTable((ModifyTable *) node,
166  estate, eflags);
167  break;
168 
169  case T_Append:
170  result = (PlanState *) ExecInitAppend((Append *) node,
171  estate, eflags);
172  break;
173 
174  case T_MergeAppend:
175  result = (PlanState *) ExecInitMergeAppend((MergeAppend *) node,
176  estate, eflags);
177  break;
178 
179  case T_RecursiveUnion:
180  result = (PlanState *) ExecInitRecursiveUnion((RecursiveUnion *) node,
181  estate, eflags);
182  break;
183 
184  case T_BitmapAnd:
185  result = (PlanState *) ExecInitBitmapAnd((BitmapAnd *) node,
186  estate, eflags);
187  break;
188 
189  case T_BitmapOr:
190  result = (PlanState *) ExecInitBitmapOr((BitmapOr *) node,
191  estate, eflags);
192  break;
193 
194  /*
195  * scan nodes
196  */
197  case T_SeqScan:
198  result = (PlanState *) ExecInitSeqScan((SeqScan *) node,
199  estate, eflags);
200  break;
201 
202  case T_SampleScan:
203  result = (PlanState *) ExecInitSampleScan((SampleScan *) node,
204  estate, eflags);
205  break;
206 
207  case T_IndexScan:
208  result = (PlanState *) ExecInitIndexScan((IndexScan *) node,
209  estate, eflags);
210  break;
211 
212  case T_IndexOnlyScan:
213  result = (PlanState *) ExecInitIndexOnlyScan((IndexOnlyScan *) node,
214  estate, eflags);
215  break;
216 
217  case T_BitmapIndexScan:
218  result = (PlanState *) ExecInitBitmapIndexScan((BitmapIndexScan *) node,
219  estate, eflags);
220  break;
221 
222  case T_BitmapHeapScan:
223  result = (PlanState *) ExecInitBitmapHeapScan((BitmapHeapScan *) node,
224  estate, eflags);
225  break;
226 
227  case T_TidScan:
228  result = (PlanState *) ExecInitTidScan((TidScan *) node,
229  estate, eflags);
230  break;
231 
232  case T_SubqueryScan:
233  result = (PlanState *) ExecInitSubqueryScan((SubqueryScan *) node,
234  estate, eflags);
235  break;
236 
237  case T_FunctionScan:
238  result = (PlanState *) ExecInitFunctionScan((FunctionScan *) node,
239  estate, eflags);
240  break;
241 
242  case T_ValuesScan:
243  result = (PlanState *) ExecInitValuesScan((ValuesScan *) node,
244  estate, eflags);
245  break;
246 
247  case T_CteScan:
248  result = (PlanState *) ExecInitCteScan((CteScan *) node,
249  estate, eflags);
250  break;
251 
252  case T_WorkTableScan:
253  result = (PlanState *) ExecInitWorkTableScan((WorkTableScan *) node,
254  estate, eflags);
255  break;
256 
257  case T_ForeignScan:
258  result = (PlanState *) ExecInitForeignScan((ForeignScan *) node,
259  estate, eflags);
260  break;
261 
262  case T_CustomScan:
263  result = (PlanState *) ExecInitCustomScan((CustomScan *) node,
264  estate, eflags);
265  break;
266 
267  /*
268  * join nodes
269  */
270  case T_NestLoop:
271  result = (PlanState *) ExecInitNestLoop((NestLoop *) node,
272  estate, eflags);
273  break;
274 
275  case T_MergeJoin:
276  result = (PlanState *) ExecInitMergeJoin((MergeJoin *) node,
277  estate, eflags);
278  break;
279 
280  case T_HashJoin:
281  result = (PlanState *) ExecInitHashJoin((HashJoin *) node,
282  estate, eflags);
283  break;
284 
285  /*
286  * materialization nodes
287  */
288  case T_Material:
289  result = (PlanState *) ExecInitMaterial((Material *) node,
290  estate, eflags);
291  break;
292 
293  case T_Sort:
294  result = (PlanState *) ExecInitSort((Sort *) node,
295  estate, eflags);
296  break;
297 
298  case T_Group:
299  result = (PlanState *) ExecInitGroup((Group *) node,
300  estate, eflags);
301  break;
302 
303  case T_Agg:
304  result = (PlanState *) ExecInitAgg((Agg *) node,
305  estate, eflags);
306  break;
307 
308  case T_WindowAgg:
309  result = (PlanState *) ExecInitWindowAgg((WindowAgg *) node,
310  estate, eflags);
311  break;
312 
313  case T_Unique:
314  result = (PlanState *) ExecInitUnique((Unique *) node,
315  estate, eflags);
316  break;
317 
318  case T_Gather:
319  result = (PlanState *) ExecInitGather((Gather *) node,
320  estate, eflags);
321  break;
322 
323  case T_Hash:
324  result = (PlanState *) ExecInitHash((Hash *) node,
325  estate, eflags);
326  break;
327 
328  case T_SetOp:
329  result = (PlanState *) ExecInitSetOp((SetOp *) node,
330  estate, eflags);
331  break;
332 
333  case T_LockRows:
334  result = (PlanState *) ExecInitLockRows((LockRows *) node,
335  estate, eflags);
336  break;
337 
338  case T_Limit:
339  result = (PlanState *) ExecInitLimit((Limit *) node,
340  estate, eflags);
341  break;
342 
343  default:
344  elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
345  result = NULL; /* keep compiler quiet */
346  break;
347  }
348 
349  /*
350  * Initialize any initPlans present in this node. The planner put them in
351  * a separate list for us.
352  */
353  subps = NIL;
354  foreach(l, node->initPlan)
355  {
356  SubPlan *subplan = (SubPlan *) lfirst(l);
357  SubPlanState *sstate;
358 
359  Assert(IsA(subplan, SubPlan));
360  sstate = ExecInitSubPlan(subplan, result);
361  subps = lappend(subps, sstate);
362  }
363  result->initPlan = subps;
364 
365  /* Set up instrumentation for this node if requested */
366  if (estate->es_instrument)
367  result->instrument = InstrAlloc(1, estate->es_instrument);
368 
369  return result;
370 }
371 
372 
373 /* ----------------------------------------------------------------
374  * ExecProcNode
375  *
376  * Execute the given node to return a(nother) tuple.
377  * ----------------------------------------------------------------
378  */
381 {
382  TupleTableSlot *result;
383 
385 
386  if (node->chgParam != NULL) /* something changed */
387  ExecReScan(node); /* let ReScan handle this */
388 
389  if (node->instrument)
390  InstrStartNode(node->instrument);
391 
392  switch (nodeTag(node))
393  {
394  /*
395  * control nodes
396  */
397  case T_ResultState:
398  result = ExecResult((ResultState *) node);
399  break;
400 
401  case T_ProjectSetState:
402  result = ExecProjectSet((ProjectSetState *) node);
403  break;
404 
405  case T_ModifyTableState:
406  result = ExecModifyTable((ModifyTableState *) node);
407  break;
408 
409  case T_AppendState:
410  result = ExecAppend((AppendState *) node);
411  break;
412 
413  case T_MergeAppendState:
414  result = ExecMergeAppend((MergeAppendState *) node);
415  break;
416 
418  result = ExecRecursiveUnion((RecursiveUnionState *) node);
419  break;
420 
421  /* BitmapAndState does not yield tuples */
422 
423  /* BitmapOrState does not yield tuples */
424 
425  /*
426  * scan nodes
427  */
428  case T_SeqScanState:
429  result = ExecSeqScan((SeqScanState *) node);
430  break;
431 
432  case T_SampleScanState:
433  result = ExecSampleScan((SampleScanState *) node);
434  break;
435 
436  case T_IndexScanState:
437  result = ExecIndexScan((IndexScanState *) node);
438  break;
439 
441  result = ExecIndexOnlyScan((IndexOnlyScanState *) node);
442  break;
443 
444  /* BitmapIndexScanState does not yield tuples */
445 
447  result = ExecBitmapHeapScan((BitmapHeapScanState *) node);
448  break;
449 
450  case T_TidScanState:
451  result = ExecTidScan((TidScanState *) node);
452  break;
453 
454  case T_SubqueryScanState:
455  result = ExecSubqueryScan((SubqueryScanState *) node);
456  break;
457 
458  case T_FunctionScanState:
459  result = ExecFunctionScan((FunctionScanState *) node);
460  break;
461 
462  case T_ValuesScanState:
463  result = ExecValuesScan((ValuesScanState *) node);
464  break;
465 
466  case T_CteScanState:
467  result = ExecCteScan((CteScanState *) node);
468  break;
469 
471  result = ExecWorkTableScan((WorkTableScanState *) node);
472  break;
473 
474  case T_ForeignScanState:
475  result = ExecForeignScan((ForeignScanState *) node);
476  break;
477 
478  case T_CustomScanState:
479  result = ExecCustomScan((CustomScanState *) node);
480  break;
481 
482  /*
483  * join nodes
484  */
485  case T_NestLoopState:
486  result = ExecNestLoop((NestLoopState *) node);
487  break;
488 
489  case T_MergeJoinState:
490  result = ExecMergeJoin((MergeJoinState *) node);
491  break;
492 
493  case T_HashJoinState:
494  result = ExecHashJoin((HashJoinState *) node);
495  break;
496 
497  /*
498  * materialization nodes
499  */
500  case T_MaterialState:
501  result = ExecMaterial((MaterialState *) node);
502  break;
503 
504  case T_SortState:
505  result = ExecSort((SortState *) node);
506  break;
507 
508  case T_GroupState:
509  result = ExecGroup((GroupState *) node);
510  break;
511 
512  case T_AggState:
513  result = ExecAgg((AggState *) node);
514  break;
515 
516  case T_WindowAggState:
517  result = ExecWindowAgg((WindowAggState *) node);
518  break;
519 
520  case T_UniqueState:
521  result = ExecUnique((UniqueState *) node);
522  break;
523 
524  case T_GatherState:
525  result = ExecGather((GatherState *) node);
526  break;
527 
528  case T_HashState:
529  result = ExecHash((HashState *) node);
530  break;
531 
532  case T_SetOpState:
533  result = ExecSetOp((SetOpState *) node);
534  break;
535 
536  case T_LockRowsState:
537  result = ExecLockRows((LockRowsState *) node);
538  break;
539 
540  case T_LimitState:
541  result = ExecLimit((LimitState *) node);
542  break;
543 
544  default:
545  elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
546  result = NULL;
547  break;
548  }
549 
550  if (node->instrument)
551  InstrStopNode(node->instrument, TupIsNull(result) ? 0.0 : 1.0);
552 
553  return result;
554 }
555 
556 
557 /* ----------------------------------------------------------------
558  * MultiExecProcNode
559  *
560  * Execute a node that doesn't return individual tuples
561  * (it might return a hashtable, bitmap, etc). Caller should
562  * check it got back the expected kind of Node.
563  *
564  * This has essentially the same responsibilities as ExecProcNode,
565  * but it does not do InstrStartNode/InstrStopNode (mainly because
566  * it can't tell how many returned tuples to count). Each per-node
567  * function must provide its own instrumentation support.
568  * ----------------------------------------------------------------
569  */
570 Node *
572 {
573  Node *result;
574 
576 
577  if (node->chgParam != NULL) /* something changed */
578  ExecReScan(node); /* let ReScan handle this */
579 
580  switch (nodeTag(node))
581  {
582  /*
583  * Only node types that actually support multiexec will be listed
584  */
585 
586  case T_HashState:
587  result = MultiExecHash((HashState *) node);
588  break;
589 
592  break;
593 
594  case T_BitmapAndState:
595  result = MultiExecBitmapAnd((BitmapAndState *) node);
596  break;
597 
598  case T_BitmapOrState:
599  result = MultiExecBitmapOr((BitmapOrState *) node);
600  break;
601 
602  default:
603  elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
604  result = NULL;
605  break;
606  }
607 
608  return result;
609 }
610 
611 
612 /* ----------------------------------------------------------------
613  * ExecEndNode
614  *
615  * Recursively cleans up all the nodes in the plan rooted
616  * at 'node'.
617  *
618  * After this operation, the query plan will not be able to be
619  * processed any further. This should be called only after
620  * the query plan has been fully executed.
621  * ----------------------------------------------------------------
622  */
623 void
625 {
626  /*
627  * do nothing when we get to the end of a leaf on tree.
628  */
629  if (node == NULL)
630  return;
631 
632  if (node->chgParam != NULL)
633  {
634  bms_free(node->chgParam);
635  node->chgParam = NULL;
636  }
637 
638  switch (nodeTag(node))
639  {
640  /*
641  * control nodes
642  */
643  case T_ResultState:
644  ExecEndResult((ResultState *) node);
645  break;
646 
647  case T_ProjectSetState:
649  break;
650 
651  case T_ModifyTableState:
653  break;
654 
655  case T_AppendState:
656  ExecEndAppend((AppendState *) node);
657  break;
658 
659  case T_MergeAppendState:
661  break;
662 
665  break;
666 
667  case T_BitmapAndState:
669  break;
670 
671  case T_BitmapOrState:
672  ExecEndBitmapOr((BitmapOrState *) node);
673  break;
674 
675  /*
676  * scan nodes
677  */
678  case T_SeqScanState:
679  ExecEndSeqScan((SeqScanState *) node);
680  break;
681 
682  case T_SampleScanState:
684  break;
685 
686  case T_GatherState:
687  ExecEndGather((GatherState *) node);
688  break;
689 
690  case T_IndexScanState:
692  break;
693 
696  break;
697 
700  break;
701 
704  break;
705 
706  case T_TidScanState:
707  ExecEndTidScan((TidScanState *) node);
708  break;
709 
710  case T_SubqueryScanState:
712  break;
713 
714  case T_FunctionScanState:
716  break;
717 
718  case T_ValuesScanState:
720  break;
721 
722  case T_CteScanState:
723  ExecEndCteScan((CteScanState *) node);
724  break;
725 
728  break;
729 
730  case T_ForeignScanState:
732  break;
733 
734  case T_CustomScanState:
736  break;
737 
738  /*
739  * join nodes
740  */
741  case T_NestLoopState:
742  ExecEndNestLoop((NestLoopState *) node);
743  break;
744 
745  case T_MergeJoinState:
747  break;
748 
749  case T_HashJoinState:
750  ExecEndHashJoin((HashJoinState *) node);
751  break;
752 
753  /*
754  * materialization nodes
755  */
756  case T_MaterialState:
757  ExecEndMaterial((MaterialState *) node);
758  break;
759 
760  case T_SortState:
761  ExecEndSort((SortState *) node);
762  break;
763 
764  case T_GroupState:
765  ExecEndGroup((GroupState *) node);
766  break;
767 
768  case T_AggState:
769  ExecEndAgg((AggState *) node);
770  break;
771 
772  case T_WindowAggState:
774  break;
775 
776  case T_UniqueState:
777  ExecEndUnique((UniqueState *) node);
778  break;
779 
780  case T_HashState:
781  ExecEndHash((HashState *) node);
782  break;
783 
784  case T_SetOpState:
785  ExecEndSetOp((SetOpState *) node);
786  break;
787 
788  case T_LockRowsState:
789  ExecEndLockRows((LockRowsState *) node);
790  break;
791 
792  case T_LimitState:
793  ExecEndLimit((LimitState *) node);
794  break;
795 
796  default:
797  elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
798  break;
799  }
800 }
801 
802 /*
803  * ExecShutdownNode
804  *
805  * Give execution nodes a chance to stop asynchronous resource consumption
806  * and release any resources still held. Currently, this is only used for
807  * parallel query, but we might want to extend it to other cases also (e.g.
808  * FDW). We might also want to call it sooner, as soon as it's evident that
809  * no more rows will be needed (e.g. when a Limit is filled) rather than only
810  * at the end of ExecutorRun.
811  */
812 bool
814 {
815  if (node == NULL)
816  return false;
817 
819 
820  switch (nodeTag(node))
821  {
822  case T_GatherState:
824  break;
825  default:
826  break;
827  }
828 
829  return false;
830 }
void ExecEndGroup(GroupState *node)
Definition: nodeGroup.c:230
MergeJoinState * ExecInitMergeJoin(MergeJoin *node, EState *estate, int eflags)
void ExecEndSetOp(SetOpState *node)
Definition: nodeSetOp.c:575
#define NIL
Definition: pg_list.h:69
void InstrStopNode(Instrumentation *instr, double nTuples)
Definition: instrument.c:80
void ExecEndFunctionScan(FunctionScanState *node)
TupleTableSlot * ExecModifyTable(ModifyTableState *node)
TupleTableSlot * ExecTidScan(TidScanState *node)
Definition: nodeTidscan.c:389
Definition: nodes.h:75
SortState * ExecInitSort(Sort *node, EState *estate, int eflags)
Definition: nodeSort.c:152
TupleTableSlot * ExecProcNode(PlanState *node)
Definition: execProcnode.c:380
#define IsA(nodeptr, _type_)
Definition: nodes.h:559
void ExecEndNestLoop(NestLoopState *node)
Definition: nodeNestloop.c:358
TupleTableSlot * ExecSampleScan(SampleScanState *node)
BitmapHeapScanState * ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)
TupleTableSlot * ExecValuesScan(ValuesScanState *node)
Definition: nodes.h:77
Instrumentation * instrument
Definition: execnodes.h:1053
void ExecEndIndexScan(IndexScanState *node)
TupleTableSlot * ExecGroup(GroupState *node)
Definition: nodeGroup.c:35
void ExecEndLimit(LimitState *node)
Definition: nodeLimit.c:426
TupleTableSlot * ExecAgg(AggState *node)
Definition: nodeAgg.c:1899
GroupState * ExecInitGroup(Group *node, EState *estate, int eflags)
Definition: nodeGroup.c:162
MergeAppendState * ExecInitMergeAppend(MergeAppend *node, EState *estate, int eflags)
void ExecEndUnique(UniqueState *node)
Definition: nodeUnique.c:173
bool ExecShutdownNode(PlanState *node)
Definition: execProcnode.c:813
void ExecEndNode(PlanState *node)
Definition: execProcnode.c:624
List * initPlan
Definition: execnodes.h:1065
RecursiveUnionState * ExecInitRecursiveUnion(RecursiveUnion *node, EState *estate, int eflags)
NestLoopState * ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
Definition: nodeNestloop.c:258
LockRowsState * ExecInitLockRows(LockRows *node, EState *estate, int eflags)
Definition: nodeLockRows.c:348
HashState * ExecInitHash(Hash *node, EState *estate, int eflags)
Definition: nodeHash.c:162
void ExecEndWorkTableScan(WorkTableScanState *node)
void ExecReScan(PlanState *node)
Definition: execAmi.c:73
void ExecEndLockRows(LockRowsState *node)
Definition: nodeLockRows.c:446
TupleTableSlot * ExecRecursiveUnion(RecursiveUnionState *node)
TupleTableSlot * ExecFunctionScan(FunctionScanState *node)
void ExecEndBitmapAnd(BitmapAndState *node)
CteScanState * ExecInitCteScan(CteScan *node, EState *estate, int eflags)
Definition: nodeCtescan.c:166
Definition: nodes.h:508
Definition: nodes.h:48
Instrumentation * InstrAlloc(int n, int instrument_options)
Definition: instrument.c:30
Node * MultiExecHash(HashState *node)
Definition: nodeHash.c:74
AppendState * ExecInitAppend(Append *node, EState *estate, int eflags)
Definition: nodeAppend.c:120
TupleTableSlot * ExecResult(ResultState *node)
Definition: nodeResult.c:67
Definition: nodes.h:73
GatherState * ExecInitGather(Gather *node, EState *estate, int eflags)
Definition: nodeGather.c:56
void ExecEndRecursiveUnion(RecursiveUnionState *node)
SubPlanState * ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
Definition: nodeSubplan.c:692
void ExecEndSubqueryScan(SubqueryScanState *node)
void ExecEndHashJoin(HashJoinState *node)
Definition: nodeHashjoin.c:549
TupleTableSlot * ExecIndexOnlyScan(IndexOnlyScanState *node)
TupleTableSlot * ExecCustomScan(CustomScanState *node)
Definition: nodeCustom.c:109
TupleTableSlot * ExecMaterial(MaterialState *node)
Definition: nodeMaterial.c:39
TupleTableSlot * ExecIndexScan(IndexScanState *node)
void ExecEndResult(ResultState *node)
Definition: nodeResult.c:247
AggState * ExecInitAgg(Agg *node, EState *estate, int eflags)
Definition: nodeAgg.c:2395
TidScanState * ExecInitTidScan(TidScan *node, EState *estate, int eflags)
Definition: nodeTidscan.c:451
TupleTableSlot * ExecWindowAgg(WindowAggState *winstate)
Definition: nodes.h:45
#define ERROR
Definition: elog.h:43
TupleTableSlot * ExecForeignScan(ForeignScanState *node)
IndexScanState * ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)
void ExecEndAppend(AppendState *node)
Definition: nodeAppend.c:246
void InstrStartNode(Instrumentation *instr)
Definition: instrument.c:63
CustomScanState * ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags)
Definition: nodeCustom.c:24
void ExecEndForeignScan(ForeignScanState *node)
void ExecEndSort(SortState *node)
Definition: nodeSort.c:223
BitmapIndexScanState * ExecInitBitmapIndexScan(BitmapIndexScan *node, EState *estate, int eflags)
Definition: nodes.h:74
TupleTableSlot * ExecMergeAppend(MergeAppendState *node)
TupleTableSlot * ExecSubqueryScan(SubqueryScanState *node)
SampleScanState * ExecInitSampleScan(SampleScan *node, EState *estate, int eflags)
void ExecEndBitmapIndexScan(BitmapIndexScanState *node)
TupleTableSlot * ExecLockRows(LockRowsState *node)
Definition: nodeLockRows.c:39
void ExecEndValuesScan(ValuesScanState *node)
void ExecEndMergeJoin(MergeJoinState *node)
Node * MultiExecBitmapIndexScan(BitmapIndexScanState *node)
#define TupIsNull(slot)
Definition: tuptable.h:138
void ExecEndSeqScan(SeqScanState *node)
Definition: nodeSeqscan.c:225
ModifyTableState * ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
SubqueryScanState * ExecInitSubqueryScan(SubqueryScan *node, EState *estate, int eflags)
SetOpState * ExecInitSetOp(SetOp *node, EState *estate, int eflags)
Definition: nodeSetOp.c:470
int es_instrument
Definition: execnodes.h:407
void ExecEndIndexOnlyScan(IndexOnlyScanState *node)
TupleTableSlot * ExecNestLoop(NestLoopState *node)
Definition: nodeNestloop.c:60
FunctionScanState * ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
void ExecEndTidScan(TidScanState *node)
Definition: nodeTidscan.c:420
TupleTableSlot * ExecProjectSet(ProjectSetState *node)
Bitmapset * chgParam
Definition: execnodes.h:1072
List * lappend(List *list, void *datum)
Definition: list.c:128
Node * MultiExecBitmapAnd(BitmapAndState *node)
Definition: nodeBitmapAnd.c:96
ValuesScanState * ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags)
BitmapAndState * ExecInitBitmapAnd(BitmapAnd *node, EState *estate, int eflags)
Definition: nodeBitmapAnd.c:42
HashJoinState * ExecInitHashJoin(HashJoin *node, EState *estate, int eflags)
Definition: nodeHashjoin.c:384
Node * MultiExecBitmapOr(BitmapOrState *node)
Definition: nodeBitmapOr.c:97
void ExecShutdownGather(GatherState *node)
Definition: nodeGather.c:404
void ExecEndCteScan(CteScanState *node)
Definition: nodeCtescan.c:281
void ExecEndCustomScan(CustomScanState *node)
Definition: nodeCustom.c:116
UniqueState * ExecInitUnique(Unique *node, EState *estate, int eflags)
Definition: nodeUnique.c:112
TupleTableSlot * ExecWorkTableScan(WorkTableScanState *node)
void ExecEndBitmapOr(BitmapOrState *node)
Definition: nodeBitmapOr.c:180
Definition: nodes.h:79
TupleTableSlot * ExecLimit(LimitState *node)
Definition: nodeLimit.c:40
void ExecEndSampleScan(SampleScanState *node)
void bms_free(Bitmapset *a)
Definition: bitmapset.c:200
void ExecEndWindowAgg(WindowAggState *node)
BitmapOrState * ExecInitBitmapOr(BitmapOr *node, EState *estate, int eflags)
Definition: nodeBitmapOr.c:43
#define NULL
Definition: c.h:226
IndexOnlyScanState * ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
void ExecEndMergeAppend(MergeAppendState *node)
TupleTableSlot * ExecMergeJoin(MergeJoinState *node)
ResultState * ExecInitResult(Result *node, EState *estate, int eflags)
Definition: nodeResult.c:179
TupleTableSlot * ExecBitmapHeapScan(BitmapHeapScanState *node)
WindowAggState * ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags)
ProjectSetState * ExecInitProjectSet(ProjectSet *node, EState *estate, int eflags)
#define nodeTag(nodeptr)
Definition: nodes.h:513
TupleTableSlot * ExecUnique(UniqueState *node)
Definition: nodeUnique.c:46
TupleTableSlot * ExecSeqScan(SeqScanState *node)
Definition: nodeSeqscan.c:125
TupleTableSlot * ExecHashJoin(HashJoinState *node)
Definition: nodeHashjoin.c:62
Definition: nodes.h:80
TupleTableSlot * ExecGather(GatherState *node)
Definition: nodeGather.c:128
TupleTableSlot * ExecSetOp(SetOpState *node)
Definition: nodeSetOp.c:183
ForeignScanState * ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)
TupleTableSlot * ExecCteScan(CteScanState *node)
Definition: nodeCtescan.c:153
Node * MultiExecProcNode(PlanState *node)
Definition: execProcnode.c:571
TupleTableSlot * ExecSort(SortState *node)
Definition: nodeSort.c:39
SeqScanState * ExecInitSeqScan(SeqScan *node, EState *estate, int eflags)
Definition: nodeSeqscan.c:163
List * initPlan
Definition: plannodes.h:133
Definition: nodes.h:78
LimitState * ExecInitLimit(Limit *node, EState *estate, int eflags)
Definition: nodeLimit.c:364
void ExecEndHash(HashState *node)
Definition: nodeHash.c:222
void ExecEndProjectSet(ProjectSetState *node)
void ExecEndMaterial(MaterialState *node)
Definition: nodeMaterial.c:240
WorkTableScanState * ExecInitWorkTableScan(WorkTableScan *node, EState *estate, int eflags)
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:97
Definition: plannodes.h:730
#define elog
Definition: elog.h:219
void ExecEndBitmapHeapScan(BitmapHeapScanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
Definition: execProcnode.c:137
Definition: pg_list.h:45
bool planstate_tree_walker(PlanState *planstate, bool(*walker)(), void *context)
Definition: nodeFuncs.c:3639
void ExecEndAgg(AggState *node)
Definition: nodeAgg.c:3487
void ExecEndModifyTable(ModifyTableState *node)
TupleTableSlot * ExecHash(HashState *node)
Definition: nodeHash.c:60
MaterialState * ExecInitMaterial(Material *node, EState *estate, int eflags)
Definition: nodeMaterial.c:163
TupleTableSlot * ExecAppend(AppendState *node)
Definition: nodeAppend.c:194
void ExecEndGather(GatherState *node)
Definition: nodeGather.c:230
Definition: nodes.h:82