PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
execnodes.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * execnodes.h
4  * definitions for executor state nodes
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/nodes/execnodes.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef EXECNODES_H
15 #define EXECNODES_H
16 
17 #include "access/genam.h"
18 #include "access/heapam.h"
19 #include "access/tupconvert.h"
20 #include "executor/instrument.h"
21 #include "lib/pairingheap.h"
22 #include "nodes/params.h"
23 #include "nodes/plannodes.h"
24 #include "utils/hsearch.h"
25 #include "utils/queryenvironment.h"
26 #include "utils/reltrigger.h"
27 #include "utils/sortsupport.h"
28 #include "utils/tuplestore.h"
29 #include "utils/tuplesort.h"
30 #include "nodes/tidbitmap.h"
32 
33 
34 /* ----------------
35  * ExprState node
36  *
37  * ExprState is the top-level node for expression evaluation.
38  * It contains instructions (in ->steps) to evaluate the expression.
39  * ----------------
40  */
41 struct ExprState; /* forward references in this file */
42 struct ExprContext;
43 struct ExprEvalStep; /* avoid including execExpr.h everywhere */
44 
45 typedef Datum (*ExprStateEvalFunc) (struct ExprState *expression,
46  struct ExprContext *econtext,
47  bool *isNull);
48 
49 /* Bits in ExprState->flags (see also execExpr.h for private flag bits): */
50 /* expression is for use with ExecQual() */
51 #define EEO_FLAG_IS_QUAL (1 << 0)
52 
53 typedef struct ExprState
54 {
56 
57  uint8 flags; /* bitmask of EEO_FLAG_* bits, see above */
58 
59  /*
60  * Storage for result value of a scalar expression, or for individual
61  * column results within expressions built by ExecBuildProjectionInfo().
62  */
63  bool resnull;
65 
66  /*
67  * If projecting a tuple result, this slot holds the result; else NULL.
68  */
70 
71  /*
72  * Instructions to compute expression's return value.
73  */
75 
76  /*
77  * Function that actually evaluates the expression. This can be set to
78  * different values depending on the complexity of the expression.
79  */
81 
82  /* original expression tree, for debugging only */
84 
85  /*
86  * XXX: following only needed during "compilation", could be thrown away.
87  */
88 
89  int steps_len; /* number of steps currently */
90  int steps_alloc; /* allocated length of steps array */
91 
94 
97 } ExprState;
98 
99 
100 /* ----------------
101  * IndexInfo information
102  *
103  * this struct holds the information needed to construct new index
104  * entries for a particular index. Used for both index_build and
105  * retail creation of index entries.
106  *
107  * NumIndexAttrs number of columns in this index
108  * KeyAttrNumbers underlying-rel attribute numbers used as keys
109  * (zeroes indicate expressions)
110  * Expressions expr trees for expression entries, or NIL if none
111  * ExpressionsState exec state for expressions, or NIL if none
112  * Predicate partial-index predicate, or NIL if none
113  * PredicateState exec state for predicate, or NIL if none
114  * ExclusionOps Per-column exclusion operators, or NULL if none
115  * ExclusionProcs Underlying function OIDs for ExclusionOps
116  * ExclusionStrats Opclass strategy numbers for ExclusionOps
117  * UniqueOps Theses are like Exclusion*, but for unique indexes
118  * UniqueProcs
119  * UniqueStrats
120  * Unique is it a unique index?
121  * ReadyForInserts is it valid for inserts?
122  * Concurrent are we doing a concurrent index build?
123  * BrokenHotChain did we detect any broken HOT chains?
124  * AmCache private cache area for index AM
125  * Context memory context holding this IndexInfo
126  *
127  * ii_Concurrent and ii_BrokenHotChain are used only during index build;
128  * they're conventionally set to false otherwise.
129  * ----------------
130  */
131 typedef struct IndexInfo
132 {
136  List *ii_Expressions; /* list of Expr */
137  List *ii_ExpressionsState; /* list of ExprState */
138  List *ii_Predicate; /* list of Expr */
140  Oid *ii_ExclusionOps; /* array with one entry per column */
141  Oid *ii_ExclusionProcs; /* array with one entry per column */
142  uint16 *ii_ExclusionStrats; /* array with one entry per column */
143  Oid *ii_UniqueOps; /* array with one entry per column */
144  Oid *ii_UniqueProcs; /* array with one entry per column */
145  uint16 *ii_UniqueStrats; /* array with one entry per column */
146  bool ii_Unique;
150  void *ii_AmCache;
152 } IndexInfo;
153 
154 /* ----------------
155  * ExprContext_CB
156  *
157  * List of callbacks to be called at ExprContext shutdown.
158  * ----------------
159  */
161 
162 typedef struct ExprContext_CB
163 {
168 
169 /* ----------------
170  * ExprContext
171  *
172  * This class holds the "current context" information
173  * needed to evaluate expressions for doing tuple qualifications
174  * and tuple projections. For example, if an expression refers
175  * to an attribute in the current inner tuple then we need to know
176  * what the current inner tuple is and so we look at the expression
177  * context.
178  *
179  * There are two memory contexts associated with an ExprContext:
180  * * ecxt_per_query_memory is a query-lifespan context, typically the same
181  * context the ExprContext node itself is allocated in. This context
182  * can be used for purposes such as storing function call cache info.
183  * * ecxt_per_tuple_memory is a short-term context for expression results.
184  * As the name suggests, it will typically be reset once per tuple,
185  * before we begin to evaluate expressions for that tuple. Each
186  * ExprContext normally has its very own per-tuple memory context.
187  *
188  * CurrentMemoryContext should be set to ecxt_per_tuple_memory before
189  * calling ExecEvalExpr() --- see ExecEvalExprSwitchContext().
190  * ----------------
191  */
192 typedef struct ExprContext
193 {
195 
196  /* Tuples that Var nodes in expression may refer to */
200 
201  /* Memory contexts for expression evaluation --- see notes above */
204 
205  /* Values to substitute for Param nodes in expression */
206  ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */
207  ParamListInfo ecxt_param_list_info; /* for other param types */
208 
209  /*
210  * Values to substitute for Aggref nodes in the expressions of an Agg
211  * node, or for WindowFunc nodes within a WindowAgg node.
212  */
213  Datum *ecxt_aggvalues; /* precomputed values for aggs/windowfuncs */
214  bool *ecxt_aggnulls; /* null flags for aggs/windowfuncs */
215 
216  /* Value to substitute for CaseTestExpr nodes in expression */
219 
220  /* Value to substitute for CoerceToDomainValue nodes in expression */
223 
224  /* Link to containing EState (NULL if a standalone ExprContext) */
226 
227  /* Functions to call back when ExprContext is shut down or rescanned */
229 } ExprContext;
230 
231 /*
232  * Set-result status used when evaluating functions potentially returning a
233  * set.
234  */
235 typedef enum
236 {
237  ExprSingleResult, /* expression does not return a set */
238  ExprMultipleResult, /* this result is an element of a set */
239  ExprEndResult /* there are no more elements in the set */
240 } ExprDoneCond;
241 
242 /*
243  * Return modes for functions returning sets. Note values must be chosen
244  * as separate bits so that a bitmask can be formed to indicate supported
245  * modes. SFRM_Materialize_Random and SFRM_Materialize_Preferred are
246  * auxiliary flags about SFRM_Materialize mode, rather than separate modes.
247  */
248 typedef enum
249 {
250  SFRM_ValuePerCall = 0x01, /* one value returned per call */
251  SFRM_Materialize = 0x02, /* result set instantiated in Tuplestore */
252  SFRM_Materialize_Random = 0x04, /* Tuplestore needs randomAccess */
253  SFRM_Materialize_Preferred = 0x08 /* caller prefers Tuplestore */
255 
256 /*
257  * When calling a function that might return a set (multiple rows),
258  * a node of this type is passed as fcinfo->resultinfo to allow
259  * return status to be passed back. A function returning set should
260  * raise an error if no such resultinfo is provided.
261  */
262 typedef struct ReturnSetInfo
263 {
265  /* values set by caller: */
266  ExprContext *econtext; /* context function is being called in */
267  TupleDesc expectedDesc; /* tuple descriptor expected by caller */
268  int allowedModes; /* bitmask: return modes caller can handle */
269  /* result status from function (but pre-initialized by caller): */
270  SetFunctionReturnMode returnMode; /* actual return mode */
271  ExprDoneCond isDone; /* status for ValuePerCall mode */
272  /* fields filled by function in Materialize return mode: */
273  Tuplestorestate *setResult; /* holds the complete returned tuple set */
274  TupleDesc setDesc; /* actual descriptor for returned tuples */
275 } ReturnSetInfo;
276 
277 /* ----------------
278  * ProjectionInfo node information
279  *
280  * This is all the information needed to perform projections ---
281  * that is, form new tuples by evaluation of targetlist expressions.
282  * Nodes which need to do projections create one of these.
283  *
284  * The target tuple slot is kept in ProjectionInfo->pi_state.resultslot.
285  * ExecProject() evaluates the tlist, forms a tuple, and stores it
286  * in the given slot. Note that the result will be a "virtual" tuple
287  * unless ExecMaterializeSlot() is then called to force it to be
288  * converted to a physical tuple. The slot must have a tupledesc
289  * that matches the output of the tlist!
290  * ----------------
291  */
292 typedef struct ProjectionInfo
293 {
295  /* instructions to evaluate projection */
297  /* expression context in which to evaluate expression */
300 
301 /* ----------------
302  * JunkFilter
303  *
304  * This class is used to store information regarding junk attributes.
305  * A junk attribute is an attribute in a tuple that is needed only for
306  * storing intermediate information in the executor, and does not belong
307  * in emitted tuples. For example, when we do an UPDATE query,
308  * the planner adds a "junk" entry to the targetlist so that the tuples
309  * returned to ExecutePlan() contain an extra attribute: the ctid of
310  * the tuple to be updated. This is needed to do the update, but we
311  * don't want the ctid to be part of the stored new tuple! So, we
312  * apply a "junk filter" to remove the junk attributes and form the
313  * real output tuple. The junkfilter code also provides routines to
314  * extract the values of the junk attribute(s) from the input tuple.
315  *
316  * targetList: the original target list (including junk attributes).
317  * cleanTupType: the tuple descriptor for the "clean" tuple (with
318  * junk attributes removed).
319  * cleanMap: A map with the correspondence between the non-junk
320  * attribute numbers of the "original" tuple and the
321  * attribute numbers of the "clean" tuple.
322  * resultSlot: tuple slot used to hold cleaned tuple.
323  * junkAttNo: not used by junkfilter code. Can be used by caller
324  * to remember the attno of a specific junk attribute
325  * (nodeModifyTable.c keeps the "ctid" or "wholerow"
326  * attno here).
327  * ----------------
328  */
329 typedef struct JunkFilter
330 {
337 } JunkFilter;
338 
339 /* ----------------
340  * ResultRelInfo information
341  *
342  * Whenever we update an existing relation, we have to
343  * update indices on the relation, and perhaps also fire triggers.
344  * The ResultRelInfo class is used to hold all the information needed
345  * about a result relation, including indices.. -cim 10/15/89
346  *
347  * RangeTableIndex result relation's range table index
348  * RelationDesc relation descriptor for result relation
349  * NumIndices # of indices existing on result relation
350  * IndexRelationDescs array of relation descriptors for indices
351  * IndexRelationInfo array of key/attr info for indices
352  * TrigDesc triggers to be fired, if any
353  * TrigFunctions cached lookup info for trigger functions
354  * TrigWhenExprs array of trigger WHEN expr states
355  * TrigInstrument optional runtime measurements for triggers
356  * FdwRoutine FDW callback functions, if foreign table
357  * FdwState available to save private state of FDW
358  * usesFdwDirectModify true when modifying foreign table directly
359  * WithCheckOptions list of WithCheckOption's to be checked
360  * WithCheckOptionExprs list of WithCheckOption expr states
361  * ConstraintExprs array of constraint-checking expr states
362  * junkFilter for removing junk attributes from tuples
363  * projectReturning for computing a RETURNING list
364  * onConflictSetProj for computing ON CONFLICT DO UPDATE SET
365  * onConflictSetWhere list of ON CONFLICT DO UPDATE exprs (qual)
366  * PartitionCheck partition check expression
367  * PartitionCheckExpr partition check expression state
368  * ----------------
369  */
370 typedef struct ResultRelInfo
371 {
383  void *ri_FdwState;
395 } ResultRelInfo;
396 
397 /* ----------------
398  * EState information
399  *
400  * Master working state for an Executor invocation
401  * ----------------
402  */
403 typedef struct EState
404 {
406 
407  /* Basic state for all query types: */
408  ScanDirection es_direction; /* current scan direction */
409  Snapshot es_snapshot; /* time qual to use */
410  Snapshot es_crosscheck_snapshot; /* crosscheck time qual for RI */
411  List *es_range_table; /* List of RangeTblEntry */
412  PlannedStmt *es_plannedstmt; /* link to top of plan tree */
413  const char *es_sourceText; /* Source text from QueryDesc */
414 
415  JunkFilter *es_junkFilter; /* top-level junk filter, if any */
416 
417  /* If query can insert/delete tuples, the command ID to mark them with */
419 
420  /* Info about target table(s) for insert/update/delete queries: */
421  ResultRelInfo *es_result_relations; /* array of ResultRelInfos */
422  int es_num_result_relations; /* length of array */
423  ResultRelInfo *es_result_relation_info; /* currently active array elt */
424 
425  /* Stuff used for firing triggers: */
426  List *es_trig_target_relations; /* trigger-only ResultRelInfos */
427  TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */
428  TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */
429  TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */
430 
431  /* Parameter info: */
432  ParamListInfo es_param_list_info; /* values of external params */
433  ParamExecData *es_param_exec_vals; /* values of internal params */
434 
435  QueryEnvironment *es_queryEnv; /* query environment */
436 
437  /* Other working state: */
438  MemoryContext es_query_cxt; /* per-query context in which EState lives */
439 
440  List *es_tupleTable; /* List of TupleTableSlots */
441 
442  List *es_rowMarks; /* List of ExecRowMarks */
443 
444  uint64 es_processed; /* # of tuples processed */
445  Oid es_lastoid; /* last oid processed (by INSERT) */
446 
447  int es_top_eflags; /* eflags passed to ExecutorStart */
448  int es_instrument; /* OR of InstrumentOption flags */
449  bool es_finished; /* true when ExecutorFinish is done */
450 
451  List *es_exprcontexts; /* List of ExprContexts within EState */
452 
453  List *es_subplanstates; /* List of PlanState for SubPlans */
454 
455  List *es_auxmodifytables; /* List of secondary ModifyTableStates */
456 
457  /*
458  * this ExprContext is for per-output-tuple operations, such as constraint
459  * checks and index-value computations. It will be reset for each output
460  * tuple. Note that it will be created only if needed.
461  */
463 
464  /*
465  * These fields are for re-evaluating plan quals when an updated tuple is
466  * substituted in READ COMMITTED mode. es_epqTuple[] contains tuples that
467  * scan plan nodes should return instead of whatever they'd normally
468  * return, or NULL if nothing to return; es_epqTupleSet[] is true if a
469  * particular array entry is valid; and es_epqScanDone[] is state to
470  * remember if the tuple has been returned already. Arrays are of size
471  * list_length(es_range_table) and are indexed by scan node scanrelid - 1.
472  */
473  HeapTuple *es_epqTuple; /* array of EPQ substitute tuples */
474  bool *es_epqTupleSet; /* true if EPQ tuple is provided */
475  bool *es_epqScanDone; /* true if EPQ tuple has been fetched */
476 
477  /* The per-query shared memory area to use for parallel execution. */
479 } EState;
480 
481 
482 /*
483  * ExecRowMark -
484  * runtime representation of FOR [KEY] UPDATE/SHARE clauses
485  *
486  * When doing UPDATE, DELETE, or SELECT FOR [KEY] UPDATE/SHARE, we will have an
487  * ExecRowMark for each non-target relation in the query (except inheritance
488  * parent RTEs, which can be ignored at runtime). Virtual relations such as
489  * subqueries-in-FROM will have an ExecRowMark with relation == NULL. See
490  * PlanRowMark for details about most of the fields. In addition to fields
491  * directly derived from PlanRowMark, we store an activity flag (to denote
492  * inactive children of inheritance trees), curCtid, which is used by the
493  * WHERE CURRENT OF code, and ermExtra, which is available for use by the plan
494  * node that sources the relation (e.g., for a foreign table the FDW can use
495  * ermExtra to hold information).
496  *
497  * EState->es_rowMarks is a list of these structs.
498  */
499 typedef struct ExecRowMark
500 {
501  Relation relation; /* opened and suitably locked relation */
502  Oid relid; /* its OID (or InvalidOid, if subquery) */
503  Index rti; /* its range table index */
504  Index prti; /* parent range table index, if child */
505  Index rowmarkId; /* unique identifier for resjunk columns */
506  RowMarkType markType; /* see enum in nodes/plannodes.h */
507  LockClauseStrength strength; /* LockingClause's strength, or LCS_NONE */
508  LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
509  bool ermActive; /* is this mark relevant for current tuple? */
510  ItemPointerData curCtid; /* ctid of currently locked tuple, if any */
511  void *ermExtra; /* available for use by relation source node */
512 } ExecRowMark;
513 
514 /*
515  * ExecAuxRowMark -
516  * additional runtime representation of FOR [KEY] UPDATE/SHARE clauses
517  *
518  * Each LockRows and ModifyTable node keeps a list of the rowmarks it needs to
519  * deal with. In addition to a pointer to the related entry in es_rowMarks,
520  * this struct carries the column number(s) of the resjunk columns associated
521  * with the rowmark (see comments for PlanRowMark for more detail). In the
522  * case of ModifyTable, there has to be a separate ExecAuxRowMark list for
523  * each child plan, because the resjunk columns could be at different physical
524  * column positions in different subplans.
525  */
526 typedef struct ExecAuxRowMark
527 {
528  ExecRowMark *rowmark; /* related entry in es_rowMarks */
529  AttrNumber ctidAttNo; /* resno of ctid junk attribute, if any */
530  AttrNumber toidAttNo; /* resno of tableoid junk attribute, if any */
531  AttrNumber wholeAttNo; /* resno of whole-row junk attribute, if any */
533 
534 
535 /* ----------------------------------------------------------------
536  * Tuple Hash Tables
537  *
538  * All-in-memory tuple hash tables are used for a number of purposes.
539  *
540  * Note: tab_hash_funcs are for the key datatype(s) stored in the table,
541  * and tab_eq_funcs are non-cross-type equality operators for those types.
542  * Normally these are the only functions used, but FindTupleHashEntry()
543  * supports searching a hashtable using cross-data-type hashing. For that,
544  * the caller must supply hash functions for the LHS datatype as well as
545  * the cross-type equality operators to use. in_hash_funcs and cur_eq_funcs
546  * are set to point to the caller's function arrays while doing such a search.
547  * During LookupTupleHashEntry(), they point to tab_hash_funcs and
548  * tab_eq_funcs respectively.
549  * ----------------------------------------------------------------
550  */
553 
554 typedef struct TupleHashEntryData
555 {
556  MinimalTuple firstTuple; /* copy of first tuple in this group */
557  void *additional; /* user data */
558  uint32 status; /* hash status */
559  uint32 hash; /* hash value (cached) */
561 
562 /* define paramters necessary to generate the tuple hash table interface */
563 #define SH_PREFIX tuplehash
564 #define SH_ELEMENT_TYPE TupleHashEntryData
565 #define SH_KEY_TYPE MinimalTuple
566 #define SH_SCOPE extern
567 #define SH_DECLARE
568 #include "lib/simplehash.h"
569 
570 typedef struct TupleHashTableData
571 {
572  tuplehash_hash *hashtab; /* underlying hash table */
573  int numCols; /* number of columns in lookup key */
574  AttrNumber *keyColIdx; /* attr numbers of key columns */
575  FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
576  FmgrInfo *tab_eq_funcs; /* equality functions for table datatype(s) */
577  MemoryContext tablecxt; /* memory context containing table */
578  MemoryContext tempcxt; /* context for function evaluations */
579  Size entrysize; /* actual size to make each hash entry */
580  TupleTableSlot *tableslot; /* slot for referencing table entries */
581  /* The following fields are set transiently for each table search: */
582  TupleTableSlot *inputslot; /* current input tuple's slot */
583  FmgrInfo *in_hash_funcs; /* hash functions for input datatype(s) */
584  FmgrInfo *cur_eq_funcs; /* equality functions for input vs. table */
585  uint32 hash_iv; /* hash-function IV */
587 
588 typedef tuplehash_iterator TupleHashIterator;
589 
590 /*
591  * Use InitTupleHashIterator/TermTupleHashIterator for a read/write scan.
592  * Use ResetTupleHashIterator if the table can be frozen (in this case no
593  * explicit scan termination is needed).
594  */
595 #define InitTupleHashIterator(htable, iter) \
596  tuplehash_start_iterate(htable->hashtab, iter)
597 #define TermTupleHashIterator(iter) \
598  ((void) 0)
599 #define ResetTupleHashIterator(htable, iter) \
600  InitTupleHashIterator(htable, iter)
601 #define ScanTupleHashTable(htable, iter) \
602  tuplehash_iterate(htable->hashtab, iter)
603 
604 
605 /* ----------------------------------------------------------------
606  * Expression State Nodes
607  *
608  * Formerly, there was a separate executor expression state node corresponding
609  * to each node in a planned expression tree. That's no longer the case; for
610  * common expression node types, all the execution info is embedded into
611  * step(s) in a single ExprState node. But we still have a few executor state
612  * node types for selected expression node types, mostly those in which info
613  * has to be shared with other parts of the execution state tree.
614  * ----------------------------------------------------------------
615  */
616 
617 /* ----------------
618  * AggrefExprState node
619  * ----------------
620  */
621 typedef struct AggrefExprState
622 {
624  Aggref *aggref; /* expression plan node */
625  int aggno; /* ID number for agg within its plan node */
627 
628 /* ----------------
629  * WindowFuncExprState node
630  * ----------------
631  */
632 typedef struct WindowFuncExprState
633 {
635  WindowFunc *wfunc; /* expression plan node */
636  List *args; /* ExprStates for argument expressions */
637  ExprState *aggfilter; /* FILTER expression */
638  int wfuncno; /* ID number for wfunc within its plan node */
640 
641 
642 /* ----------------
643  * SetExprState node
644  *
645  * State for evaluating a potentially set-returning expression (like FuncExpr
646  * or OpExpr). In some cases, like some of the expressions in ROWS FROM(...)
647  * the expression might not be a SRF, but nonetheless it uses the same
648  * machinery as SRFs; it will be treated as a SRF returning a single row.
649  * ----------------
650  */
651 typedef struct SetExprState
652 {
654  Expr *expr; /* expression plan node */
655  List *args; /* ExprStates for argument expressions */
656 
657  /*
658  * In ROWS FROM, functions can be inlined, removing the FuncExpr normally
659  * inside. In such a case this is the compiled expression (which cannot
660  * return a set), which'll be evaluated using regular ExecEvalExpr().
661  */
663 
664  /*
665  * Function manager's lookup info for the target function. If func.fn_oid
666  * is InvalidOid, we haven't initialized it yet (nor any of the following
667  * fields, except funcReturnsSet).
668  */
670 
671  /*
672  * For a set-returning function (SRF) that returns a tuplestore, we keep
673  * the tuplestore here and dole out the result rows one at a time. The
674  * slot holds the row currently being returned.
675  */
678 
679  /*
680  * In some cases we need to compute a tuple descriptor for the function's
681  * output. If so, it's stored here.
682  */
684  bool funcReturnsTuple; /* valid when funcResultDesc isn't
685  * NULL */
686 
687  /*
688  * Remember whether the function is declared to return a set. This is set
689  * by ExecInitExpr, and is valid even before the FmgrInfo is set up.
690  */
692 
693  /*
694  * setArgsValid is true when we are evaluating a set-returning function
695  * that uses value-per-call mode and we are in the middle of a call
696  * series; we want to pass the same argument values to the function again
697  * (and again, until it returns ExprEndResult). This indicates that
698  * fcinfo_data already contains valid argument data.
699  */
701 
702  /*
703  * Flag to remember whether we have registered a shutdown callback for
704  * this SetExprState. We do so only if funcResultStore or setArgsValid
705  * has been set at least once (since all the callback is for is to release
706  * the tuplestore or clear setArgsValid).
707  */
708  bool shutdown_reg; /* a shutdown callback is registered */
709 
710  /*
711  * Call parameter structure for the function. This has been initialized
712  * (by InitFunctionCallInfoData) if func.fn_oid is valid. It also saves
713  * argument values between calls, when setArgsValid is true.
714  */
716 } SetExprState;
717 
718 /* ----------------
719  * SubPlanState node
720  * ----------------
721  */
722 typedef struct SubPlanState
723 {
725  SubPlan *subplan; /* expression plan node */
726  struct PlanState *planstate; /* subselect plan's state tree */
727  struct PlanState *parent; /* parent plan node's state tree */
728  ExprState *testexpr; /* state of combining expression */
729  List *args; /* states of argument expression(s) */
730  HeapTuple curTuple; /* copy of most recent tuple from subplan */
731  Datum curArray; /* most recent array from ARRAY() subplan */
732  /* these are used when hashing the subselect's output: */
733  ProjectionInfo *projLeft; /* for projecting lefthand exprs */
734  ProjectionInfo *projRight; /* for projecting subselect output */
735  TupleHashTable hashtable; /* hash table for no-nulls subselect rows */
736  TupleHashTable hashnulls; /* hash table for rows with null(s) */
737  bool havehashrows; /* TRUE if hashtable is not empty */
738  bool havenullrows; /* TRUE if hashnulls is not empty */
739  MemoryContext hashtablecxt; /* memory context containing hash tables */
740  MemoryContext hashtempcxt; /* temp memory context for hash tables */
741  ExprContext *innerecontext; /* econtext for computing inner tuples */
742  AttrNumber *keyColIdx; /* control data for hash tables */
743  FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
744  FmgrInfo *tab_eq_funcs; /* equality functions for table datatype(s) */
745  FmgrInfo *lhs_hash_funcs; /* hash functions for lefthand datatype(s) */
746  FmgrInfo *cur_eq_funcs; /* equality functions for LHS vs. table */
747 } SubPlanState;
748 
749 /* ----------------
750  * AlternativeSubPlanState node
751  * ----------------
752  */
754 {
756  AlternativeSubPlan *subplan; /* expression plan node */
757  List *subplans; /* SubPlanStates of alternative subplans */
758  int active; /* list index of the one we're using */
760 
761 /*
762  * DomainConstraintState - one item to check during CoerceToDomain
763  *
764  * Note: we consider this to be part of an ExprState tree, so we give it
765  * a name following the xxxState convention. But there's no directly
766  * associated plan-tree node.
767  */
769 {
773 
774 typedef struct DomainConstraintState
775 {
777  DomainConstraintType constrainttype; /* constraint type */
778  char *name; /* name of constraint (for error msgs) */
779  Expr *check_expr; /* for CHECK, a boolean expression */
780  ExprState *check_exprstate; /* check_expr's eval state, or NULL */
782 
783 
784 /* ----------------------------------------------------------------
785  * Executor State Trees
786  *
787  * An executing query has a PlanState tree paralleling the Plan tree
788  * that describes the plan.
789  * ----------------------------------------------------------------
790  */
791 
792 /* ----------------
793  * PlanState node
794  *
795  * We never actually instantiate any PlanState nodes; this is just the common
796  * abstract superclass for all PlanState-type nodes.
797  * ----------------
798  */
799 typedef struct PlanState
800 {
802 
803  Plan *plan; /* associated Plan node */
804 
805  EState *state; /* at execution time, states of individual
806  * nodes point to one EState for the whole
807  * top-level plan */
808 
809  Instrumentation *instrument; /* Optional runtime stats for this node */
810  WorkerInstrumentation *worker_instrument; /* per-worker instrumentation */
811 
812  /*
813  * Common structural data for all Plan types. These links to subsidiary
814  * state trees parallel links in the associated plan tree (except for the
815  * subPlan list, which does not exist in the plan tree).
816  */
817  ExprState *qual; /* boolean qual condition */
818  struct PlanState *lefttree; /* input plan tree(s) */
820  List *initPlan; /* Init SubPlanState nodes (un-correlated expr
821  * subselects) */
822  List *subPlan; /* SubPlanState nodes in my expressions */
823 
824  /*
825  * State for management of parameter-change-driven rescanning
826  */
827  Bitmapset *chgParam; /* set of IDs of changed Params */
828 
829  /*
830  * Other run-time state needed by most if not all node types.
831  */
832  TupleTableSlot *ps_ResultTupleSlot; /* slot for my result tuples */
833  ExprContext *ps_ExprContext; /* node's expression-evaluation context */
834  ProjectionInfo *ps_ProjInfo; /* info for doing tuple projection */
835 } PlanState;
836 
837 /* ----------------
838  * these are defined to avoid confusion problems with "left"
839  * and "right" and "inner" and "outer". The convention is that
840  * the "left" plan is the "outer" plan and the "right" plan is
841  * the inner plan, but these make the code more readable.
842  * ----------------
843  */
844 #define innerPlanState(node) (((PlanState *)(node))->righttree)
845 #define outerPlanState(node) (((PlanState *)(node))->lefttree)
846 
847 /* Macros for inline access to certain instrumentation counters */
848 #define InstrCountFiltered1(node, delta) \
849  do { \
850  if (((PlanState *)(node))->instrument) \
851  ((PlanState *)(node))->instrument->nfiltered1 += (delta); \
852  } while(0)
853 #define InstrCountFiltered2(node, delta) \
854  do { \
855  if (((PlanState *)(node))->instrument) \
856  ((PlanState *)(node))->instrument->nfiltered2 += (delta); \
857  } while(0)
858 
859 /*
860  * EPQState is state for executing an EvalPlanQual recheck on a candidate
861  * tuple in ModifyTable or LockRows. The estate and planstate fields are
862  * NULL if inactive.
863  */
864 typedef struct EPQState
865 {
866  EState *estate; /* subsidiary EState */
867  PlanState *planstate; /* plan state tree ready to be executed */
868  TupleTableSlot *origslot; /* original output tuple to be rechecked */
869  Plan *plan; /* plan tree to be executed */
870  List *arowMarks; /* ExecAuxRowMarks (non-locking only) */
871  int epqParam; /* ID of Param to force scan node re-eval */
872 } EPQState;
873 
874 
875 /* ----------------
876  * ResultState information
877  * ----------------
878  */
879 typedef struct ResultState
880 {
881  PlanState ps; /* its first field is NodeTag */
883  bool rs_done; /* are we done? */
884  bool rs_checkqual; /* do we need to check the qual? */
885 } ResultState;
886 
887 /* ----------------
888  * ProjectSetState information
889  *
890  * Note: at least one of the "elems" will be a SetExprState; the rest are
891  * regular ExprStates.
892  * ----------------
893  */
894 typedef struct ProjectSetState
895 {
896  PlanState ps; /* its first field is NodeTag */
897  Node **elems; /* array of expression states */
898  ExprDoneCond *elemdone; /* array of per-SRF is-done states */
899  int nelems; /* length of elemdone[] array */
900  bool pending_srf_tuples; /* still evaluating srfs in tlist? */
902 
903 /* ----------------
904  * ModifyTableState information
905  * ----------------
906  */
907 typedef struct ModifyTableState
908 {
909  PlanState ps; /* its first field is NodeTag */
910  CmdType operation; /* INSERT, UPDATE, or DELETE */
911  bool canSetTag; /* do we set the command tag/es_processed? */
912  bool mt_done; /* are we done? */
913  PlanState **mt_plans; /* subplans (one per target rel) */
914  int mt_nplans; /* number of plans in the array */
915  int mt_whichplan; /* which one is being executed (0..n-1) */
916  ResultRelInfo *resultRelInfo; /* per-subplan target relations */
917  List **mt_arowmarks; /* per-subplan ExecAuxRowMark lists */
918  EPQState mt_epqstate; /* for evaluating EvalPlanQual rechecks */
919  bool fireBSTriggers; /* do we need to fire stmt triggers? */
920  OnConflictAction mt_onconflict; /* ON CONFLICT type */
921  List *mt_arbiterindexes; /* unique index OIDs to arbitrate
922  * taking alt path */
923  TupleTableSlot *mt_existing; /* slot to store existing target tuple in */
924  List *mt_excludedtlist; /* the excluded pseudo relation's
925  * tlist */
926  TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection
927  * target */
929  /* Tuple-routing support info */
930  int mt_num_dispatch; /* Number of entries in the above
931  * array */
932  int mt_num_partitions; /* Number of members in the
933  * following arrays */
934  ResultRelInfo *mt_partitions; /* Per partition result relation */
936  /* Per partition tuple conversion map */
939 
940 /* ----------------
941  * AppendState information
942  *
943  * nplans how many plans are in the array
944  * whichplan which plan is being executed (0 .. n-1)
945  * ----------------
946  */
947 typedef struct AppendState
948 {
949  PlanState ps; /* its first field is NodeTag */
950  PlanState **appendplans; /* array of PlanStates for my inputs */
953 } AppendState;
954 
955 /* ----------------
956  * MergeAppendState information
957  *
958  * nplans how many plans are in the array
959  * nkeys number of sort key columns
960  * sortkeys sort keys in SortSupport representation
961  * slots current output tuple of each subplan
962  * heap heap of active tuples
963  * initialized true if we have fetched first tuple from each subplan
964  * ----------------
965  */
966 typedef struct MergeAppendState
967 {
968  PlanState ps; /* its first field is NodeTag */
969  PlanState **mergeplans; /* array of PlanStates for my inputs */
971  int ms_nkeys;
972  SortSupport ms_sortkeys; /* array of length ms_nkeys */
973  TupleTableSlot **ms_slots; /* array of length ms_nplans */
974  struct binaryheap *ms_heap; /* binary heap of slot indices */
975  bool ms_initialized; /* are subplans started? */
977 
978 /* ----------------
979  * RecursiveUnionState information
980  *
981  * RecursiveUnionState is used for performing a recursive union.
982  *
983  * recursing T when we're done scanning the non-recursive term
984  * intermediate_empty T if intermediate_table is currently empty
985  * working_table working table (to be scanned by recursive term)
986  * intermediate_table current recursive output (next generation of WT)
987  * ----------------
988  */
989 typedef struct RecursiveUnionState
990 {
991  PlanState ps; /* its first field is NodeTag */
992  bool recursing;
996  /* Remaining fields are unused in UNION ALL case */
997  FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
998  FmgrInfo *hashfunctions; /* per-grouping-field hash fns */
999  MemoryContext tempContext; /* short-term context for comparisons */
1000  TupleHashTable hashtable; /* hash table for tuples already seen */
1001  MemoryContext tableContext; /* memory context containing hash table */
1003 
1004 /* ----------------
1005  * BitmapAndState information
1006  * ----------------
1007  */
1008 typedef struct BitmapAndState
1009 {
1010  PlanState ps; /* its first field is NodeTag */
1011  PlanState **bitmapplans; /* array of PlanStates for my inputs */
1012  int nplans; /* number of input plans */
1013 } BitmapAndState;
1014 
1015 /* ----------------
1016  * BitmapOrState information
1017  * ----------------
1018  */
1019 typedef struct BitmapOrState
1020 {
1021  PlanState ps; /* its first field is NodeTag */
1022  PlanState **bitmapplans; /* array of PlanStates for my inputs */
1023  int nplans; /* number of input plans */
1024 } BitmapOrState;
1025 
1026 /* ----------------------------------------------------------------
1027  * Scan State Information
1028  * ----------------------------------------------------------------
1029  */
1030 
1031 /* ----------------
1032  * ScanState information
1033  *
1034  * ScanState extends PlanState for node types that represent
1035  * scans of an underlying relation. It can also be used for nodes
1036  * that scan the output of an underlying plan node --- in that case,
1037  * only ScanTupleSlot is actually useful, and it refers to the tuple
1038  * retrieved from the subplan.
1039  *
1040  * currentRelation relation being scanned (NULL if none)
1041  * currentScanDesc current scan descriptor for scan (NULL if none)
1042  * ScanTupleSlot pointer to slot in tuple table holding scan tuple
1043  * ----------------
1044  */
1045 typedef struct ScanState
1046 {
1047  PlanState ps; /* its first field is NodeTag */
1051 } ScanState;
1052 
1053 /* ----------------
1054  * SeqScanState information
1055  * ----------------
1056  */
1057 typedef struct SeqScanState
1058 {
1059  ScanState ss; /* its first field is NodeTag */
1060  Size pscan_len; /* size of parallel heap scan descriptor */
1061 } SeqScanState;
1062 
1063 /* ----------------
1064  * SampleScanState information
1065  * ----------------
1066  */
1067 typedef struct SampleScanState
1068 {
1070  List *args; /* expr states for TABLESAMPLE params */
1071  ExprState *repeatable; /* expr state for REPEATABLE expr */
1072  /* use struct pointer to avoid including tsmapi.h here */
1073  struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */
1074  void *tsm_state; /* tablesample method can keep state here */
1075  bool use_bulkread; /* use bulkread buffer access strategy? */
1076  bool use_pagemode; /* use page-at-a-time visibility checking? */
1077  bool begun; /* false means need to call BeginSampleScan */
1078  uint32 seed; /* random seed */
1079 } SampleScanState;
1080 
1081 /*
1082  * These structs store information about index quals that don't have simple
1083  * constant right-hand sides. See comments for ExecIndexBuildScanKeys()
1084  * for discussion.
1085  */
1086 typedef struct
1087 {
1088  ScanKey scan_key; /* scankey to put value into */
1089  ExprState *key_expr; /* expr to evaluate to get value */
1090  bool key_toastable; /* is expr's result a toastable datatype? */
1092 
1093 typedef struct
1094 {
1095  ScanKey scan_key; /* scankey to put value into */
1096  ExprState *array_expr; /* expr to evaluate to get array value */
1097  int next_elem; /* next array element to use */
1098  int num_elems; /* number of elems in current array value */
1099  Datum *elem_values; /* array of num_elems Datums */
1100  bool *elem_nulls; /* array of num_elems is-null flags */
1102 
1103 /* ----------------
1104  * IndexScanState information
1105  *
1106  * indexqualorig execution state for indexqualorig expressions
1107  * indexorderbyorig execution state for indexorderbyorig expressions
1108  * ScanKeys Skey structures for index quals
1109  * NumScanKeys number of ScanKeys
1110  * OrderByKeys Skey structures for index ordering operators
1111  * NumOrderByKeys number of OrderByKeys
1112  * RuntimeKeys info about Skeys that must be evaluated at runtime
1113  * NumRuntimeKeys number of RuntimeKeys
1114  * RuntimeKeysReady true if runtime Skeys have been computed
1115  * RuntimeContext expr context for evaling runtime Skeys
1116  * RelationDesc index relation descriptor
1117  * ScanDesc index scan descriptor
1118  *
1119  * ReorderQueue tuples that need reordering due to re-check
1120  * ReachedEnd have we fetched all tuples from index already?
1121  * OrderByValues values of ORDER BY exprs of last fetched tuple
1122  * OrderByNulls null flags for OrderByValues
1123  * SortSupport for reordering ORDER BY exprs
1124  * OrderByTypByVals is the datatype of order by expression pass-by-value?
1125  * OrderByTypLens typlens of the datatypes of order by expressions
1126  * pscan_len size of parallel index scan descriptor
1127  * ----------------
1128  */
1129 typedef struct IndexScanState
1130 {
1131  ScanState ss; /* its first field is NodeTag */
1144 
1145  /* These are needed for re-checking ORDER BY expr ordering */
1154 } IndexScanState;
1155 
1156 /* ----------------
1157  * IndexOnlyScanState information
1158  *
1159  * indexqual execution state for indexqual expressions
1160  * ScanKeys Skey structures for index quals
1161  * NumScanKeys number of ScanKeys
1162  * OrderByKeys Skey structures for index ordering operators
1163  * NumOrderByKeys number of OrderByKeys
1164  * RuntimeKeys info about Skeys that must be evaluated at runtime
1165  * NumRuntimeKeys number of RuntimeKeys
1166  * RuntimeKeysReady true if runtime Skeys have been computed
1167  * RuntimeContext expr context for evaling runtime Skeys
1168  * RelationDesc index relation descriptor
1169  * ScanDesc index scan descriptor
1170  * VMBuffer buffer in use for visibility map testing, if any
1171  * HeapFetches number of tuples we were forced to fetch from heap
1172  * ioss_PscanLen Size of parallel index-only scan descriptor
1173  * ----------------
1174  */
1175 typedef struct IndexOnlyScanState
1176 {
1177  ScanState ss; /* its first field is NodeTag */
1193 
1194 /* ----------------
1195  * BitmapIndexScanState information
1196  *
1197  * result bitmap to return output into, or NULL
1198  * ScanKeys Skey structures for index quals
1199  * NumScanKeys number of ScanKeys
1200  * RuntimeKeys info about Skeys that must be evaluated at runtime
1201  * NumRuntimeKeys number of RuntimeKeys
1202  * ArrayKeys info about Skeys that come from ScalarArrayOpExprs
1203  * NumArrayKeys number of ArrayKeys
1204  * RuntimeKeysReady true if runtime Skeys have been computed
1205  * RuntimeContext expr context for evaling runtime Skeys
1206  * RelationDesc index relation descriptor
1207  * ScanDesc index scan descriptor
1208  * ----------------
1209  */
1210 typedef struct BitmapIndexScanState
1211 {
1212  ScanState ss; /* its first field is NodeTag */
1225 
1226 /* ----------------
1227  * SharedBitmapState information
1228  *
1229  * BM_INITIAL TIDBitmap creation is not yet started, so first worker
1230  * to see this state will set the state to BM_INPROGRESS
1231  * and that process will be responsible for creating
1232  * TIDBitmap.
1233  * BM_INPROGRESS TIDBitmap creation is in progress; workers need to
1234  * sleep until it's finished.
1235  * BM_FINISHED TIDBitmap creation is done, so now all workers can
1236  * proceed to iterate over TIDBitmap.
1237  * ----------------
1238  */
1239 typedef enum
1240 {
1245 
1246 /* ----------------
1247  * ParallelBitmapHeapState information
1248  * tbmiterator iterator for scanning current pages
1249  * prefetch_iterator iterator for prefetching ahead of current page
1250  * mutex mutual exclusion for the prefetching variable
1251  * and state
1252  * prefetch_pages # pages prefetch iterator is ahead of current
1253  * prefetch_target current target prefetch distance
1254  * state current state of the TIDBitmap
1255  * cv conditional wait variable
1256  * phs_snapshot_data snapshot data shared to workers
1257  * ----------------
1258  */
1260 {
1268  char phs_snapshot_data[FLEXIBLE_ARRAY_MEMBER];
1270 
1271 /* ----------------
1272  * BitmapHeapScanState information
1273  *
1274  * bitmapqualorig execution state for bitmapqualorig expressions
1275  * tbm bitmap obtained from child index scan(s)
1276  * tbmiterator iterator for scanning current pages
1277  * tbmres current-page data
1278  * exact_pages total number of exact pages retrieved
1279  * lossy_pages total number of lossy pages retrieved
1280  * prefetch_iterator iterator for prefetching ahead of current page
1281  * prefetch_pages # pages prefetch iterator is ahead of current
1282  * prefetch_target current target prefetch distance
1283  * prefetch_maximum maximum value for prefetch_target
1284  * pscan_len size of the shared memory for parallel bitmap
1285  * initialized is node is ready to iterate
1286  * shared_tbmiterator shared iterator
1287  * shared_prefetch_iterator shared iterator for prefetching
1288  * pstate shared state for parallel bitmap scan
1289  * ----------------
1290  */
1291 typedef struct BitmapHeapScanState
1292 {
1293  ScanState ss; /* its first field is NodeTag */
1310 
1311 /* ----------------
1312  * TidScanState information
1313  *
1314  * tidexprs list of TidExpr structs (see nodeTidscan.c)
1315  * isCurrentOf scan has a CurrentOfExpr qual
1316  * NumTids number of tids in this scan
1317  * TidPtr index of currently fetched tid
1318  * TidList evaluated item pointers (array of size NumTids)
1319  * htup currently-fetched tuple, if any
1320  * ----------------
1321  */
1322 typedef struct TidScanState
1323 {
1324  ScanState ss; /* its first field is NodeTag */
1331 } TidScanState;
1332 
1333 /* ----------------
1334  * SubqueryScanState information
1335  *
1336  * SubqueryScanState is used for scanning a sub-query in the range table.
1337  * ScanTupleSlot references the current output tuple of the sub-query.
1338  * ----------------
1339  */
1340 typedef struct SubqueryScanState
1341 {
1342  ScanState ss; /* its first field is NodeTag */
1345 
1346 /* ----------------
1347  * FunctionScanState information
1348  *
1349  * Function nodes are used to scan the results of a
1350  * function appearing in FROM (typically a function returning set).
1351  *
1352  * eflags node's capability flags
1353  * ordinality is this scan WITH ORDINALITY?
1354  * simple true if we have 1 function and no ordinality
1355  * ordinal current ordinal column value
1356  * nfuncs number of functions being executed
1357  * funcstates per-function execution states (private in
1358  * nodeFunctionscan.c)
1359  * argcontext memory context to evaluate function arguments in
1360  * ----------------
1361  */
1363 
1364 typedef struct FunctionScanState
1365 {
1366  ScanState ss; /* its first field is NodeTag */
1367  int eflags;
1369  bool simple;
1370  int64 ordinal;
1371  int nfuncs;
1372  struct FunctionScanPerFuncState *funcstates; /* array of length
1373  * nfuncs */
1376 
1377 /* ----------------
1378  * ValuesScanState information
1379  *
1380  * ValuesScan nodes are used to scan the results of a VALUES list
1381  *
1382  * rowcontext per-expression-list context
1383  * exprlists array of expression lists being evaluated
1384  * array_len size of array
1385  * curr_idx current array index (0-based)
1386  *
1387  * Note: ss.ps.ps_ExprContext is used to evaluate any qual or projection
1388  * expressions attached to the node. We create a second ExprContext,
1389  * rowcontext, in which to build the executor expression state for each
1390  * Values sublist. Resetting this context lets us get rid of expression
1391  * state for each row, avoiding major memory leakage over a long values list.
1392  * ----------------
1393  */
1394 typedef struct ValuesScanState
1395 {
1396  ScanState ss; /* its first field is NodeTag */
1401 } ValuesScanState;
1402 
1403 /* ----------------
1404  * TableFuncScanState node
1405  *
1406  * Used in table-expression functions like XMLTABLE.
1407  * ----------------
1408  */
1409 typedef struct TableFuncScanState
1410 {
1411  ScanState ss; /* its first field is NodeTag */
1412  ExprState *docexpr; /* state for document expression */
1413  ExprState *rowexpr; /* state for row-generating expression */
1414  List *colexprs; /* state for column-generating expression */
1415  List *coldefexprs; /* state for column default expressions */
1416  List *ns_names; /* list of str nodes with namespace names */
1417  List *ns_uris; /* list of states of namespace uri exprs */
1418  Bitmapset *notnulls; /* nullability flag for each output column */
1419  void *opaque; /* table builder private space */
1420  const struct TableFuncRoutine *routine; /* table builder methods */
1421  FmgrInfo *in_functions; /* input function for each column */
1422  Oid *typioparams; /* typioparam for each column */
1423  int64 ordinal; /* row number to be output next */
1424  MemoryContext perValueCxt; /* short life context for value evaluation */
1425  Tuplestorestate *tupstore; /* output tuple store */
1427 
1428 /* ----------------
1429  * CteScanState information
1430  *
1431  * CteScan nodes are used to scan a CommonTableExpr query.
1432  *
1433  * Multiple CteScan nodes can read out from the same CTE query. We use
1434  * a tuplestore to hold rows that have been read from the CTE query but
1435  * not yet consumed by all readers.
1436  * ----------------
1437  */
1438 typedef struct CteScanState
1439 {
1440  ScanState ss; /* its first field is NodeTag */
1441  int eflags; /* capability flags to pass to tuplestore */
1442  int readptr; /* index of my tuplestore read pointer */
1443  PlanState *cteplanstate; /* PlanState for the CTE query itself */
1444  /* Link to the "leader" CteScanState (possibly this same node) */
1446  /* The remaining fields are only valid in the "leader" CteScanState */
1447  Tuplestorestate *cte_table; /* rows already read from the CTE query */
1448  bool eof_cte; /* reached end of CTE query? */
1449 } CteScanState;
1450 
1451 /* ----------------
1452  * NamedTuplestoreScanState information
1453  *
1454  * NamedTuplestoreScan nodes are used to scan a Tuplestore created and
1455  * named prior to execution of the query. An example is a transition
1456  * table for an AFTER trigger.
1457  *
1458  * Multiple NamedTuplestoreScan nodes can read out from the same Tuplestore.
1459  * ----------------
1460  */
1462 {
1463  ScanState ss; /* its first field is NodeTag */
1464  int readptr; /* index of my tuplestore read pointer */
1465  TupleDesc tupdesc; /* format of the tuples in the tuplestore */
1466  Tuplestorestate *relation; /* the rows */
1468 
1469 /* ----------------
1470  * WorkTableScanState information
1471  *
1472  * WorkTableScan nodes are used to scan the work table created by
1473  * a RecursiveUnion node. We locate the RecursiveUnion node
1474  * during executor startup.
1475  * ----------------
1476  */
1477 typedef struct WorkTableScanState
1478 {
1479  ScanState ss; /* its first field is NodeTag */
1482 
1483 /* ----------------
1484  * ForeignScanState information
1485  *
1486  * ForeignScan nodes are used to scan foreign-data tables.
1487  * ----------------
1488  */
1489 typedef struct ForeignScanState
1490 {
1491  ScanState ss; /* its first field is NodeTag */
1492  ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */
1493  Size pscan_len; /* size of parallel coordination information */
1494  /* use struct pointer to avoid including fdwapi.h here */
1496  void *fdw_state; /* foreign-data wrapper can keep state here */
1498 
1499 /* ----------------
1500  * CustomScanState information
1501  *
1502  * CustomScan nodes are used to execute custom code within executor.
1503  *
1504  * Core code must avoid assuming that the CustomScanState is only as large as
1505  * the structure declared here; providers are allowed to make it the first
1506  * element in a larger structure, and typically would need to do so. The
1507  * struct is actually allocated by the CreateCustomScanState method associated
1508  * with the plan node. Any additional fields can be initialized there, or in
1509  * the BeginCustomScan method.
1510  * ----------------
1511  */
1512 struct CustomExecMethods;
1513 
1514 typedef struct CustomScanState
1515 {
1517  uint32 flags; /* mask of CUSTOMPATH_* flags, see
1518  * nodes/extensible.h */
1519  List *custom_ps; /* list of child PlanState nodes, if any */
1520  Size pscan_len; /* size of parallel coordination information */
1522 } CustomScanState;
1523 
1524 /* ----------------------------------------------------------------
1525  * Join State Information
1526  * ----------------------------------------------------------------
1527  */
1528 
1529 /* ----------------
1530  * JoinState information
1531  *
1532  * Superclass for state nodes of join plans.
1533  * ----------------
1534  */
1535 typedef struct JoinState
1536 {
1539  bool single_match; /* True if we should skip to next outer tuple
1540  * after finding one inner match */
1541  ExprState *joinqual; /* JOIN quals (in addition to ps.qual) */
1542 } JoinState;
1543 
1544 /* ----------------
1545  * NestLoopState information
1546  *
1547  * NeedNewOuter true if need new outer tuple on next call
1548  * MatchedOuter true if found a join match for current outer tuple
1549  * NullInnerTupleSlot prepared null tuple for left outer joins
1550  * ----------------
1551  */
1552 typedef struct NestLoopState
1553 {
1554  JoinState js; /* its first field is NodeTag */
1558 } NestLoopState;
1559 
1560 /* ----------------
1561  * MergeJoinState information
1562  *
1563  * NumClauses number of mergejoinable join clauses
1564  * Clauses info for each mergejoinable clause
1565  * JoinState current state of ExecMergeJoin state machine
1566  * SkipMarkRestore true if we may skip Mark and Restore operations
1567  * ExtraMarks true to issue extra Mark operations on inner scan
1568  * ConstFalseJoin true if we have a constant-false joinqual
1569  * FillOuter true if should emit unjoined outer tuples anyway
1570  * FillInner true if should emit unjoined inner tuples anyway
1571  * MatchedOuter true if found a join match for current outer tuple
1572  * MatchedInner true if found a join match for current inner tuple
1573  * OuterTupleSlot slot in tuple table for cur outer tuple
1574  * InnerTupleSlot slot in tuple table for cur inner tuple
1575  * MarkedTupleSlot slot in tuple table for marked tuple
1576  * NullOuterTupleSlot prepared null tuple for right outer joins
1577  * NullInnerTupleSlot prepared null tuple for left outer joins
1578  * OuterEContext workspace for computing outer tuple's join values
1579  * InnerEContext workspace for computing inner tuple's join values
1580  * ----------------
1581  */
1582 /* private in nodeMergejoin.c: */
1584 
1585 typedef struct MergeJoinState
1586 {
1587  JoinState js; /* its first field is NodeTag */
1589  MergeJoinClause mj_Clauses; /* array of length mj_NumClauses */
1605 } MergeJoinState;
1606 
1607 /* ----------------
1608  * HashJoinState information
1609  *
1610  * hashclauses original form of the hashjoin condition
1611  * hj_OuterHashKeys the outer hash keys in the hashjoin condition
1612  * hj_InnerHashKeys the inner hash keys in the hashjoin condition
1613  * hj_HashOperators the join operators in the hashjoin condition
1614  * hj_HashTable hash table for the hashjoin
1615  * (NULL if table not built yet)
1616  * hj_CurHashValue hash value for current outer tuple
1617  * hj_CurBucketNo regular bucket# for current outer tuple
1618  * hj_CurSkewBucketNo skew bucket# for current outer tuple
1619  * hj_CurTuple last inner tuple matched to current outer
1620  * tuple, or NULL if starting search
1621  * (hj_CurXXX variables are undefined if
1622  * OuterTupleSlot is empty!)
1623  * hj_OuterTupleSlot tuple slot for outer tuples
1624  * hj_HashTupleSlot tuple slot for inner (hashed) tuples
1625  * hj_NullOuterTupleSlot prepared null tuple for right/full outer joins
1626  * hj_NullInnerTupleSlot prepared null tuple for left/full outer joins
1627  * hj_FirstOuterTupleSlot first tuple retrieved from outer plan
1628  * hj_JoinState current state of ExecHashJoin state machine
1629  * hj_MatchedOuter true if found a join match for current outer
1630  * hj_OuterNotEmpty true if outer relation known not empty
1631  * ----------------
1632  */
1633 
1634 /* these structs are defined in executor/hashjoin.h: */
1637 
1638 typedef struct HashJoinState
1639 {
1640  JoinState js; /* its first field is NodeTag */
1642  List *hj_OuterHashKeys; /* list of ExprState nodes */
1643  List *hj_InnerHashKeys; /* list of ExprState nodes */
1644  List *hj_HashOperators; /* list of operator OIDs */
1645  HashJoinTable hj_HashTable;
1649  HashJoinTuple hj_CurTuple;
1658 } HashJoinState;
1659 
1660 
1661 /* ----------------------------------------------------------------
1662  * Materialization State Information
1663  * ----------------------------------------------------------------
1664  */
1665 
1666 /* ----------------
1667  * MaterialState information
1668  *
1669  * materialize nodes are used to materialize the results
1670  * of a subplan into a temporary file.
1671  *
1672  * ss.ss_ScanTupleSlot refers to output of underlying plan.
1673  * ----------------
1674  */
1675 typedef struct MaterialState
1676 {
1677  ScanState ss; /* its first field is NodeTag */
1678  int eflags; /* capability flags to pass to tuplestore */
1679  bool eof_underlying; /* reached end of underlying plan? */
1681 } MaterialState;
1682 
1683 /* ----------------
1684  * SortState information
1685  * ----------------
1686  */
1687 typedef struct SortState
1688 {
1689  ScanState ss; /* its first field is NodeTag */
1690  bool randomAccess; /* need random access to sort output? */
1691  bool bounded; /* is the result set bounded? */
1692  int64 bound; /* if bounded, how many tuples are needed */
1693  bool sort_Done; /* sort completed yet? */
1694  bool bounded_Done; /* value of bounded we did the sort with */
1695  int64 bound_Done; /* value of bound we did the sort with */
1696  void *tuplesortstate; /* private state of tuplesort.c */
1697 } SortState;
1698 
1699 /* ---------------------
1700  * GroupState information
1701  * ---------------------
1702  */
1703 typedef struct GroupState
1704 {
1705  ScanState ss; /* its first field is NodeTag */
1706  FmgrInfo *eqfunctions; /* per-field lookup data for equality fns */
1707  bool grp_done; /* indicates completion of Group scan */
1708 } GroupState;
1709 
1710 /* ---------------------
1711  * AggState information
1712  *
1713  * ss.ss_ScanTupleSlot refers to output of underlying plan.
1714  *
1715  * Note: ss.ps.ps_ExprContext contains ecxt_aggvalues and
1716  * ecxt_aggnulls arrays, which hold the computed agg values for the current
1717  * input group during evaluation of an Agg node's output tuple(s). We
1718  * create a second ExprContext, tmpcontext, in which to evaluate input
1719  * expressions and run the aggregate transition functions.
1720  * ---------------------
1721  */
1722 /* these structs are private in nodeAgg.c: */
1728 
1729 typedef struct AggState
1730 {
1731  ScanState ss; /* its first field is NodeTag */
1732  List *aggs; /* all Aggref nodes in targetlist & quals */
1733  int numaggs; /* length of list (could be zero!) */
1734  int numtrans; /* number of pertrans items */
1735  AggStrategy aggstrategy; /* strategy mode */
1736  AggSplit aggsplit; /* agg-splitting mode, see nodes.h */
1737  AggStatePerPhase phase; /* pointer to current phase data */
1738  int numphases; /* number of phases (including phase 0) */
1739  int current_phase; /* current phase number */
1740  AggStatePerAgg peragg; /* per-Aggref information */
1741  AggStatePerTrans pertrans; /* per-Trans state information */
1742  ExprContext *hashcontext; /* econtexts for long-lived data (hashtable) */
1743  ExprContext **aggcontexts; /* econtexts for long-lived data (per GS) */
1744  ExprContext *tmpcontext; /* econtext for input expressions */
1745  ExprContext *curaggcontext; /* currently active aggcontext */
1746  AggStatePerTrans curpertrans; /* currently active trans state */
1747  bool input_done; /* indicates end of input */
1748  bool agg_done; /* indicates completion of Agg scan */
1749  int projected_set; /* The last projected grouping set */
1750  int current_set; /* The current grouping set being evaluated */
1751  Bitmapset *grouped_cols; /* grouped cols in current projection */
1752  List *all_grouped_cols; /* list of all grouped cols in DESC
1753  * order */
1754  /* These fields are for grouping set phase data */
1755  int maxsets; /* The max number of sets in any phase */
1756  AggStatePerPhase phases; /* array of all phases */
1757  Tuplesortstate *sort_in; /* sorted input to phases > 1 */
1758  Tuplesortstate *sort_out; /* input is copied here for next phase */
1759  TupleTableSlot *sort_slot; /* slot for sort results */
1760  /* these fields are used in AGG_PLAIN and AGG_SORTED modes: */
1761  AggStatePerGroup pergroup; /* per-Aggref-per-group working state */
1762  HeapTuple grp_firstTuple; /* copy of first tuple of current group */
1763  /* these fields are used in AGG_HASHED and AGG_MIXED modes: */
1764  bool table_filled; /* hash table filled yet? */
1766  AggStatePerHash perhash;
1767  AggStatePerGroup *hash_pergroup; /* array of per-group pointers */
1768  /* support for evaluation of agg inputs */
1769  TupleTableSlot *evalslot; /* slot for agg inputs */
1770  ProjectionInfo *evalproj; /* projection machinery */
1771  TupleDesc evaldesc; /* descriptor of input tuples */
1772 } AggState;
1773 
1774 /* ----------------
1775  * WindowAggState information
1776  * ----------------
1777  */
1778 /* these structs are private in nodeWindowAgg.c: */
1781 
1782 typedef struct WindowAggState
1783 {
1784  ScanState ss; /* its first field is NodeTag */
1785 
1786  /* these fields are filled in by ExecInitExpr: */
1787  List *funcs; /* all WindowFunc nodes in targetlist */
1788  int numfuncs; /* total number of window functions */
1789  int numaggs; /* number that are plain aggregates */
1790 
1791  WindowStatePerFunc perfunc; /* per-window-function information */
1792  WindowStatePerAgg peragg; /* per-plain-aggregate information */
1793  FmgrInfo *partEqfunctions; /* equality funcs for partition columns */
1794  FmgrInfo *ordEqfunctions; /* equality funcs for ordering columns */
1795  Tuplestorestate *buffer; /* stores rows of current partition */
1796  int current_ptr; /* read pointer # for current */
1797  int64 spooled_rows; /* total # of rows in buffer */
1798  int64 currentpos; /* position of current row in partition */
1799  int64 frameheadpos; /* current frame head position */
1800  int64 frametailpos; /* current frame tail position */
1801  /* use struct pointer to avoid including windowapi.h here */
1802  struct WindowObjectData *agg_winobj; /* winobj for aggregate
1803  * fetches */
1804  int64 aggregatedbase; /* start row for current aggregates */
1805  int64 aggregatedupto; /* rows before this one are aggregated */
1806 
1807  int frameOptions; /* frame_clause options, see WindowDef */
1808  ExprState *startOffset; /* expression for starting bound offset */
1809  ExprState *endOffset; /* expression for ending bound offset */
1810  Datum startOffsetValue; /* result of startOffset evaluation */
1811  Datum endOffsetValue; /* result of endOffset evaluation */
1812 
1813  MemoryContext partcontext; /* context for partition-lifespan data */
1814  MemoryContext aggcontext; /* shared context for aggregate working data */
1815  MemoryContext curaggcontext; /* current aggregate's working data */
1816  ExprContext *tmpcontext; /* short-term evaluation context */
1817 
1818  bool all_first; /* true if the scan is starting */
1819  bool all_done; /* true if the scan is finished */
1820  bool partition_spooled; /* true if all tuples in current
1821  * partition have been spooled into
1822  * tuplestore */
1823  bool more_partitions;/* true if there's more partitions after this
1824  * one */
1825  bool framehead_valid;/* true if frameheadpos is known up to date
1826  * for current row */
1827  bool frametail_valid;/* true if frametailpos is known up to date
1828  * for current row */
1829 
1830  TupleTableSlot *first_part_slot; /* first tuple of current or next
1831  * partition */
1832 
1833  /* temporary slots for tuples fetched back from tuplestore */
1837 } WindowAggState;
1838 
1839 /* ----------------
1840  * UniqueState information
1841  *
1842  * Unique nodes are used "on top of" sort nodes to discard
1843  * duplicate tuples returned from the sort phase. Basically
1844  * all it does is compare the current tuple from the subplan
1845  * with the previously fetched tuple (stored in its result slot).
1846  * If the two are identical in all interesting fields, then
1847  * we just fetch another tuple from the sort and try again.
1848  * ----------------
1849  */
1850 typedef struct UniqueState
1851 {
1852  PlanState ps; /* its first field is NodeTag */
1853  FmgrInfo *eqfunctions; /* per-field lookup data for equality fns */
1854  MemoryContext tempContext; /* short-term context for comparisons */
1855 } UniqueState;
1856 
1857 /* ----------------
1858  * GatherState information
1859  *
1860  * Gather nodes launch 1 or more parallel workers, run a subplan
1861  * in those workers, and collect the results.
1862  * ----------------
1863  */
1864 typedef struct GatherState
1865 {
1866  PlanState ps; /* its first field is NodeTag */
1875 } GatherState;
1876 
1877 /* ----------------
1878  * GatherMergeState information
1879  *
1880  * Gather merge nodes launch 1 or more parallel workers, run a
1881  * subplan which produces sorted output in each worker, and then
1882  * merge the results into a single sorted stream.
1883  * ----------------
1884  */
1885 struct GMReaderTuple;
1886 
1887 typedef struct GatherMergeState
1888 {
1889  PlanState ps; /* its first field is NodeTag */
1897  struct binaryheap *gm_heap; /* binary heap of slot indices */
1898  bool gm_initialized; /* gather merge initilized ? */
1901  SortSupport gm_sortkeys; /* array of length ms_nkeys */
1902  struct GMReaderTupleBuffer *gm_tuple_buffers; /* tuple buffer per
1903  * reader */
1905 
1906 /* ----------------
1907  * HashState information
1908  * ----------------
1909  */
1910 typedef struct HashState
1911 {
1912  PlanState ps; /* its first field is NodeTag */
1913  HashJoinTable hashtable; /* hash table for the hashjoin */
1914  List *hashkeys; /* list of ExprState nodes */
1915  /* hashkeys is same as parent's hj_InnerHashKeys */
1916 } HashState;
1917 
1918 /* ----------------
1919  * SetOpState information
1920  *
1921  * Even in "sorted" mode, SetOp nodes are more complex than a simple
1922  * Unique, since we have to count how many duplicates to return. But
1923  * we also support hashing, so this is really more like a cut-down
1924  * form of Agg.
1925  * ----------------
1926  */
1927 /* this struct is private in nodeSetOp.c: */
1929 
1930 typedef struct SetOpState
1931 {
1932  PlanState ps; /* its first field is NodeTag */
1933  FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
1934  FmgrInfo *hashfunctions; /* per-grouping-field hash fns */
1935  bool setop_done; /* indicates completion of output scan */
1936  long numOutput; /* number of dups left to output */
1937  MemoryContext tempContext; /* short-term context for comparisons */
1938  /* these fields are used in SETOP_SORTED mode: */
1939  SetOpStatePerGroup pergroup; /* per-group working state */
1940  HeapTuple grp_firstTuple; /* copy of first tuple of current group */
1941  /* these fields are used in SETOP_HASHED mode: */
1942  TupleHashTable hashtable; /* hash table with one entry per group */
1943  MemoryContext tableContext; /* memory context containing hash table */
1944  bool table_filled; /* hash table filled yet? */
1945  TupleHashIterator hashiter; /* for iterating through hash table */
1946 } SetOpState;
1947 
1948 /* ----------------
1949  * LockRowsState information
1950  *
1951  * LockRows nodes are used to enforce FOR [KEY] UPDATE/SHARE locking.
1952  * ----------------
1953  */
1954 typedef struct LockRowsState
1955 {
1956  PlanState ps; /* its first field is NodeTag */
1957  List *lr_arowMarks; /* List of ExecAuxRowMarks */
1958  EPQState lr_epqstate; /* for evaluating EvalPlanQual rechecks */
1959  HeapTuple *lr_curtuples; /* locked tuples (one entry per RT entry) */
1960  int lr_ntables; /* length of lr_curtuples[] array */
1961 } LockRowsState;
1962 
1963 /* ----------------
1964  * LimitState information
1965  *
1966  * Limit nodes are used to enforce LIMIT/OFFSET clauses.
1967  * They just select the desired subrange of their subplan's output.
1968  *
1969  * offset is the number of initial tuples to skip (0 does nothing).
1970  * count is the number of tuples to return after skipping the offset tuples.
1971  * If no limit count was specified, count is undefined and noCount is true.
1972  * When lstate == LIMIT_INITIAL, offset/count/noCount haven't been set yet.
1973  * ----------------
1974  */
1975 typedef enum
1976 {
1977  LIMIT_INITIAL, /* initial state for LIMIT node */
1978  LIMIT_RESCAN, /* rescan after recomputing parameters */
1979  LIMIT_EMPTY, /* there are no returnable rows */
1980  LIMIT_INWINDOW, /* have returned a row in the window */
1981  LIMIT_SUBPLANEOF, /* at EOF of subplan (within window) */
1982  LIMIT_WINDOWEND, /* stepped off end of window */
1983  LIMIT_WINDOWSTART /* stepped off beginning of window */
1984 } LimitStateCond;
1985 
1986 typedef struct LimitState
1987 {
1988  PlanState ps; /* its first field is NodeTag */
1989  ExprState *limitOffset; /* OFFSET parameter, or NULL if none */
1990  ExprState *limitCount; /* COUNT parameter, or NULL if none */
1991  int64 offset; /* current OFFSET value */
1992  int64 count; /* current COUNT, if any */
1993  bool noCount; /* if true, ignore count */
1994  LimitStateCond lstate; /* state machine status, as above */
1995  int64 position; /* 1-based index of last tuple returned */
1996  TupleTableSlot *subSlot; /* tuple last obtained from subplan */
1997 } LimitState;
1998 
1999 #endif /* EXECNODES_H */
bool ioss_RuntimeKeysReady
Definition: execnodes.h:1185
Datum * elem_values
Definition: execnodes.h:1099
JoinType jointype
Definition: execnodes.h:1538
signed short int16
Definition: c.h:255
struct AggStatePerTransData * AggStatePerTrans
Definition: execnodes.h:1724
FmgrInfo func
Definition: execnodes.h:669
AttrNumber jf_junkAttNo
Definition: execnodes.h:336
int ri_NumIndices
Definition: execnodes.h:375
int slock_t
Definition: s_lock.h:888
AggStatePerGroup * hash_pergroup
Definition: execnodes.h:1767
struct GroupState GroupState
uint32 CommandId
Definition: c.h:411
HeapTuple * lr_curtuples
Definition: execnodes.h:1959
Node tag
Definition: execnodes.h:55
ScanState ss
Definition: execnodes.h:1491
IndexRuntimeKeyInfo * biss_RuntimeKeys
Definition: execnodes.h:1216
struct AggStatePerGroupData * AggStatePerGroup
Definition: execnodes.h:1725
JunkFilter * ri_junkFilter
Definition: execnodes.h:388
MemoryContext ii_Context
Definition: execnodes.h:151
Definition: fmgr.h:56
AttrNumber * jf_cleanMap
Definition: execnodes.h:334
MemoryContext curaggcontext
Definition: execnodes.h:1815
HeapTuple * es_epqTuple
Definition: execnodes.h:473
JunkFilter * es_junkFilter
Definition: execnodes.h:415
struct dsa_area * es_query_dsa
Definition: execnodes.h:478
uint16 * ii_UniqueStrats
Definition: execnodes.h:145
NodeTag type
Definition: execnodes.h:801
bool rs_done
Definition: execnodes.h:883
Relation ri_RelationDesc
Definition: execnodes.h:374
ExprState * endOffset
Definition: execnodes.h:1809
AggStatePerPhase phases
Definition: execnodes.h:1756
struct WindowFuncExprState WindowFuncExprState
struct GMReaderTupleBuffer * gm_tuple_buffers
Definition: execnodes.h:1902
ProjectionInfo * projLeft
Definition: execnodes.h:733
int nworkers_launched
Definition: execnodes.h:1871
HeapTuple curTuple
Definition: execnodes.h:730
ExprState * ri_onConflictSetWhere
Definition: execnodes.h:391
bool nl_MatchedOuter
Definition: execnodes.h:1556
Datum * ecxt_aggvalues
Definition: execnodes.h:213
WorkerInstrumentation * worker_instrument
Definition: execnodes.h:810
struct WindowStatePerAggData * WindowStatePerAgg
Definition: execnodes.h:1780
TupleHashTable hashtable
Definition: execnodes.h:735
ExprState * bitmapqualorig
Definition: execnodes.h:1294
MemoryContext tableContext
Definition: execnodes.h:1943
NodeTag type
Definition: execnodes.h:294
TupleTableSlot * hj_NullInnerTupleSlot
Definition: execnodes.h:1653
Datum startOffsetValue
Definition: execnodes.h:1810
TupleTableSlot ** ms_slots
Definition: execnodes.h:973
ExprState * aggfilter
Definition: execnodes.h:637
ExprContext * innerecontext
Definition: execnodes.h:741
ExprState * joinqual
Definition: execnodes.h:1541
List * ii_Predicate
Definition: execnodes.h:138
struct ScanState ScanState
CommandId es_output_cid
Definition: execnodes.h:418
ProjectionInfo * ri_onConflictSetProj
Definition: execnodes.h:390
PlanState ps
Definition: execnodes.h:896
Tuplestorestate * tuplestorestate
Definition: execnodes.h:1680
MemoryContext tempContext
Definition: execnodes.h:1937
ProjectionInfo * ps_ProjInfo
Definition: execnodes.h:834
SortSupport ms_sortkeys
Definition: execnodes.h:972
Instrumentation * instrument
Definition: execnodes.h:809
struct SetOpStatePerGroupData * SetOpStatePerGroup
Definition: execnodes.h:1928
PlanState ps
Definition: execnodes.h:1021
NodeTag type
Definition: execnodes.h:194
ResultRelInfo * mt_partitions
Definition: execnodes.h:934
ExprContext * mj_InnerEContext
Definition: execnodes.h:1604
bool bounded_Done
Definition: execnodes.h:1694
Tuplestorestate * intermediate_table
Definition: execnodes.h:995
EPQState lr_epqstate
Definition: execnodes.h:1958
bool mj_ConstFalseJoin
Definition: execnodes.h:1593
int numaggs
Definition: execnodes.h:1733
TupleTableSlot * es_trig_newtup_slot
Definition: execnodes.h:429
Oid es_lastoid
Definition: execnodes.h:445
bool noCount
Definition: execnodes.h:1993
DomainConstraintType constrainttype
Definition: execnodes.h:777
bool agg_done
Definition: execnodes.h:1748
PlanState ps
Definition: execnodes.h:1537
struct WindowAggState WindowAggState
ScanState ss
Definition: execnodes.h:1784
bool nl_NeedNewOuter
Definition: execnodes.h:1555
struct SetExprState SetExprState
TupleTableSlot * inputslot
Definition: execnodes.h:582
Relation relation
Definition: execnodes.h:501
IndexRuntimeKeyInfo * iss_RuntimeKeys
Definition: execnodes.h:1138
bool bounded
Definition: execnodes.h:1691
NodeTag type
Definition: execnodes.h:264
TupleTableSlot * sort_slot
Definition: execnodes.h:1759
List * initPlan
Definition: execnodes.h:820
List * all_grouped_cols
Definition: execnodes.h:1752
ResultRelInfo * resultRelInfo
Definition: execnodes.h:916
Tuplesortstate * sort_out
Definition: execnodes.h:1758
struct ExprEvalStep * steps
Definition: execnodes.h:74
ProjectionInfo * evalproj
Definition: execnodes.h:1770
bool shutdown_reg
Definition: execnodes.h:708
ScanState ss
Definition: execnodes.h:1731
int16 * iss_OrderByTypLens
Definition: execnodes.h:1152
bool * innermost_casenull
Definition: execnodes.h:93
FmgrInfo * hashfunctions
Definition: execnodes.h:998
ExprState * ii_PredicateState
Definition: execnodes.h:139
Relation ri_PartitionRoot
Definition: execnodes.h:394
ExprContext * ps_ExprContext
Definition: execnodes.h:833
MinimalTuple firstTuple
Definition: execnodes.h:556
SortSupport iss_SortSupport
Definition: execnodes.h:1150
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:203
LimitStateCond
Definition: execnodes.h:1975
ExprState * ri_PartitionCheckExpr
Definition: execnodes.h:393
struct BitmapHeapScanState BitmapHeapScanState
tuplehash_iterator TupleHashIterator
Definition: execnodes.h:588
bool single_match
Definition: execnodes.h:1539
HashJoinTable hashtable
Definition: execnodes.h:1913
TIDBitmap * tbm
Definition: execnodes.h:1295
int64 bound
Definition: execnodes.h:1692
bool pending_srf_tuples
Definition: execnodes.h:900
struct TableFuncScanState TableFuncScanState
TupleTableSlot * mt_conflproj
Definition: execnodes.h:926
Relation biss_RelationDesc
Definition: execnodes.h:1222
List * subPlan
Definition: execnodes.h:822
void * tsm_state
Definition: execnodes.h:1074
TupleTableSlot * mj_MarkedTupleSlot
Definition: execnodes.h:1600
AttrNumber * keyColIdx
Definition: execnodes.h:574
unsigned char uint8
Definition: c.h:266
bool need_to_scan_locally
Definition: execnodes.h:1899
Instrumentation * ri_TrigInstrument
Definition: execnodes.h:381
PlannedStmt * es_plannedstmt
Definition: execnodes.h:412
PlanState ps
Definition: execnodes.h:1932
NodeTag type
Definition: execnodes.h:623
int current_phase
Definition: execnodes.h:1739
ScanState ss
Definition: execnodes.h:1677
bool need_to_scan_locally
Definition: execnodes.h:1874
Definition: nodes.h:509
AggSplit aggsplit
Definition: execnodes.h:1736
Snapshot es_crosscheck_snapshot
Definition: execnodes.h:410
Oid * ii_ExclusionProcs
Definition: execnodes.h:141
struct CteScanState * leader
Definition: execnodes.h:1445
ScanState ss
Definition: execnodes.h:1440
int64 aggregatedupto
Definition: execnodes.h:1805
List * jf_targetList
Definition: execnodes.h:332
struct ExprState ExprState
TupleTableSlot * mj_NullInnerTupleSlot
Definition: execnodes.h:1602
bool ermActive
Definition: execnodes.h:509
TupleTableSlot * jf_resultSlot
Definition: execnodes.h:335
IndexRuntimeKeyInfo * ioss_RuntimeKeys
Definition: execnodes.h:1183
LockWaitPolicy waitPolicy
Definition: execnodes.h:508
bool hj_MatchedOuter
Definition: execnodes.h:1656
ExprContext * es_per_tuple_exprcontext
Definition: execnodes.h:462
struct NamedTuplestoreScanState NamedTuplestoreScanState
struct SubqueryScanState SubqueryScanState
struct TupleQueueReader ** reader
Definition: execnodes.h:1872
CmdType operation
Definition: execnodes.h:910
ScanState ss
Definition: execnodes.h:1059
Snapshot es_snapshot
Definition: execnodes.h:409
bool frametail_valid
Definition: execnodes.h:1827
TupleTableSlot ** gm_slots
Definition: execnodes.h:1896
HeapTuple grp_firstTuple
Definition: execnodes.h:1940
List * args
Definition: execnodes.h:655
TupleTableSlot * ss_ScanTupleSlot
Definition: execnodes.h:1050
FunctionCallInfoData fcinfo_data
Definition: execnodes.h:715
struct AggStatePerPhaseData * AggStatePerPhase
Definition: execnodes.h:1726
struct WindowStatePerFuncData * WindowStatePerFunc
Definition: execnodes.h:1779
ExprState * testexpr
Definition: execnodes.h:728
FmgrInfo * partEqfunctions
Definition: execnodes.h:1793
MemoryContext argcontext
Definition: execnodes.h:1374
PlanState ** bitmapplans
Definition: execnodes.h:1011
Datum * innermost_domainval
Definition: execnodes.h:95
LockClauseStrength strength
Definition: execnodes.h:507
DomainConstraintType
Definition: execnodes.h:768
Relation ss_currentRelation
Definition: execnodes.h:1048
AggStatePerTrans pertrans
Definition: execnodes.h:1741
EState * state
Definition: execnodes.h:805
TupleTableSlot * hj_OuterTupleSlot
Definition: execnodes.h:1650
int projected_set
Definition: execnodes.h:1749
List * custom_ps
Definition: execnodes.h:1519
LimitStateCond lstate
Definition: execnodes.h:1994
TupleTableSlot * resultslot
Definition: execnodes.h:69
List * es_range_table
Definition: execnodes.h:411
ExprState * fdw_recheck_quals
Definition: execnodes.h:1492
struct PlanState * righttree
Definition: execnodes.h:819
unsigned int Oid
Definition: postgres_ext.h:31
Datum domainValue_datum
Definition: execnodes.h:221
NodeTag
Definition: nodes.h:26
List * hj_OuterHashKeys
Definition: execnodes.h:1642
struct ExecRowMark ExecRowMark
HeapTuple grp_firstTuple
Definition: execnodes.h:1762
ExprState * limitCount
Definition: execnodes.h:1990
TupleTableSlot * temp_slot_1
Definition: execnodes.h:1835
int current_set
Definition: execnodes.h:1750
WindowStatePerFunc perfunc
Definition: execnodes.h:1791
TupleTableSlot * hj_FirstOuterTupleSlot
Definition: execnodes.h:1654
Oid * ii_UniqueOps
Definition: execnodes.h:143
bool grp_done
Definition: execnodes.h:1707
ExprState * indexqualorig
Definition: execnodes.h:1132
int64 position
Definition: execnodes.h:1995
SharedBitmapState
Definition: execnodes.h:1239
TupleDesc evaldesc
Definition: execnodes.h:1771
int numtrans
Definition: execnodes.h:1734
ScanKey iss_ScanKeys
Definition: execnodes.h:1134
Size pscan_len
Definition: execnodes.h:1060
struct ModifyTableState ModifyTableState
PlanState * planstate
Definition: execnodes.h:867
ScanDirection es_direction
Definition: execnodes.h:408
List * indexorderbyorig
Definition: execnodes.h:1133
bool * innermost_domainnull
Definition: execnodes.h:96
PlanState ps
Definition: execnodes.h:1889
uint64 dsa_pointer
Definition: dsa.h:62
Index ri_RangeTableIndex
Definition: execnodes.h:373
ExprContext * tmpcontext
Definition: execnodes.h:1744
int64 count
Definition: execnodes.h:1992
PlanState ps
Definition: execnodes.h:949
JoinType
Definition: nodes.h:672
struct PlanState * lefttree
Definition: execnodes.h:818
HeapTupleData tss_htup
Definition: execnodes.h:1330
struct HashJoinState HashJoinState
TupleTableSlot * first_part_slot
Definition: execnodes.h:1830
TupleTableSlot * mt_existing
Definition: execnodes.h:923
FmgrInfo * tab_hash_funcs
Definition: execnodes.h:575
ScanState ss
Definition: execnodes.h:1396
ExecRowMark * rowmark
Definition: execnodes.h:528
ItemPointerData curCtid
Definition: execnodes.h:510
const struct CustomExecMethods * methods
Definition: execnodes.h:1521
List * ri_WithCheckOptionExprs
Definition: execnodes.h:386
FmgrInfo * tab_hash_funcs
Definition: execnodes.h:743
bool * iss_OrderByNulls
Definition: execnodes.h:1149
ScanState ss
Definition: execnodes.h:1705
MemoryContext perValueCxt
Definition: execnodes.h:1424
ExprContext * tmpcontext
Definition: execnodes.h:1816
PlanState ps
Definition: execnodes.h:1047
ScanKey ioss_ScanKeys
Definition: execnodes.h:1179
struct WindowObjectData * agg_winobj
Definition: execnodes.h:1802
void * tuplesortstate
Definition: execnodes.h:1696
OnConflictAction mt_onconflict
Definition: execnodes.h:920
int64 frameheadpos
Definition: execnodes.h:1799
int maxsets
Definition: execnodes.h:1755
uint32 hj_CurHashValue
Definition: execnodes.h:1646
Tuplestorestate * funcResultStore
Definition: execnodes.h:676
const char * es_sourceText
Definition: execnodes.h:413
TupleDesc expectedDesc
Definition: execnodes.h:267
int hj_CurSkewBucketNo
Definition: execnodes.h:1648
List * ii_ExpressionsState
Definition: execnodes.h:137
struct ProjectSetState ProjectSetState
TupleTableSlot * ps_ResultTupleSlot
Definition: execnodes.h:832
ParamExecData * es_param_exec_vals
Definition: execnodes.h:433
unsigned short uint16
Definition: c.h:267
MemoryContext es_query_cxt
Definition: execnodes.h:438
struct ParallelExecutorInfo * pei
Definition: execnodes.h:1891
struct FunctionScanState FunctionScanState
bool mj_MatchedOuter
Definition: execnodes.h:1596
PlanState ps
Definition: execnodes.h:1010
bool table_filled
Definition: execnodes.h:1764
AggStrategy aggstrategy
Definition: execnodes.h:1735
FmgrInfo * in_hash_funcs
Definition: execnodes.h:583
NodeTag type
Definition: execnodes.h:372
PlanState ps
Definition: execnodes.h:909
int64 offset
Definition: execnodes.h:1991
bool initialized
Definition: execnodes.h:1867
Bitmapset * notnulls
Definition: execnodes.h:1418
struct PlanState * planstate
Definition: execnodes.h:726
TupleTableSlot * hj_NullOuterTupleSlot
Definition: execnodes.h:1652
bool resnull
Definition: execnodes.h:63
ScanState ss
Definition: execnodes.h:1324
ParallelBitmapHeapState * pstate
Definition: execnodes.h:1308
struct CustomScanState CustomScanState
struct ResultRelInfo ResultRelInfo
Expr * expr
Definition: execnodes.h:83
List * args
Definition: execnodes.h:729
SubPlan * subplan
Definition: execnodes.h:725
struct ParallelExecutorInfo * pei
Definition: execnodes.h:1868
Datum caseValue_datum
Definition: execnodes.h:217
PlanState ** bitmapplans
Definition: execnodes.h:1022
ExprContext_CB * ecxt_callbacks
Definition: execnodes.h:228
List * tss_tidexprs
Definition: execnodes.h:1325
NodeTag type
Definition: execnodes.h:331
AlternativeSubPlan * subplan
Definition: execnodes.h:756
struct SeqScanState SeqScanState
bool iss_ReachedEnd
Definition: execnodes.h:1147
struct TupleHashEntryData TupleHashEntryData
List * arowMarks
Definition: execnodes.h:870
struct HashJoinTupleData * HashJoinTuple
Definition: execnodes.h:1635
ExprState * resconstantqual
Definition: execnodes.h:882
bool mj_MatchedInner
Definition: execnodes.h:1597
bool ri_usesFdwDirectModify
Definition: execnodes.h:384
ScanState ss
Definition: execnodes.h:1516
Tuplesortstate * sort_in
Definition: execnodes.h:1757
AttrNumber * keyColIdx
Definition: execnodes.h:742
MemoryContext tempContext
Definition: execnodes.h:999
ItemPointerData * tss_TidList
Definition: execnodes.h:1329
NodeTag type
Definition: execnodes.h:653
ExprState ** ri_TrigWhenExprs
Definition: execnodes.h:380
TupleTableSlot * temp_slot_2
Definition: execnodes.h:1836
PlanState ps
Definition: execnodes.h:1956
ExprState * key_expr
Definition: execnodes.h:1089
bool funcReturnsSet
Definition: execnodes.h:691
Aggref * aggref
Definition: execnodes.h:624
struct BitmapAndState BitmapAndState
Datum endOffsetValue
Definition: execnodes.h:1811
Index rti
Definition: execnodes.h:503
WindowStatePerAgg peragg
Definition: execnodes.h:1792
ExprContext * ioss_RuntimeContext
Definition: execnodes.h:1186
ExprStateEvalFunc evalfunc
Definition: execnodes.h:80
struct MergeJoinClauseData * MergeJoinClause
Definition: execnodes.h:1583
struct EPQState EPQState
void * ermExtra
Definition: execnodes.h:511
Node ** elems
Definition: execnodes.h:897
const struct TableFuncRoutine * routine
Definition: execnodes.h:1420
int iss_NumRuntimeKeys
Definition: execnodes.h:1139
struct MergeJoinState MergeJoinState
ExprState * startOffset
Definition: execnodes.h:1808
MemoryContext tablecxt
Definition: execnodes.h:577
struct ExecAuxRowMark ExecAuxRowMark
TupleDesc jf_cleanTupType
Definition: execnodes.h:333
AttrNumber wholeAttNo
Definition: execnodes.h:531
HashJoinTuple hj_CurTuple
Definition: execnodes.h:1649
Oid * ii_UniqueProcs
Definition: execnodes.h:144
PlanState ps
Definition: execnodes.h:1852
bool table_filled
Definition: execnodes.h:1944
ResultRelInfo * es_result_relations
Definition: execnodes.h:421
int64 aggregatedbase
Definition: execnodes.h:1804
Index prti
Definition: execnodes.h:504
struct ExprContext ExprContext
IndexScanDesc ioss_ScanDesc
Definition: execnodes.h:1188
ExprState * docexpr
Definition: execnodes.h:1412
ScanDirection
Definition: sdir.h:22
EPQState mt_epqstate
Definition: execnodes.h:918
bool * iss_OrderByTypByVals
Definition: execnodes.h:1151
struct TupleHashTableData * TupleHashTable
Definition: execnodes.h:552
long numOutput
Definition: execnodes.h:1936
bool tss_isCurrentOf
Definition: execnodes.h:1326
PlanState ** mergeplans
Definition: execnodes.h:969
struct ValuesScanState ValuesScanState
struct AggStatePerHashData * AggStatePerHash
Definition: execnodes.h:1727
TupleTableSlot * ecxt_innertuple
Definition: execnodes.h:198
TupleTableSlot * es_trig_oldtup_slot
Definition: execnodes.h:428
bool havenullrows
Definition: execnodes.h:738
ParamExecData * ecxt_param_exec_vals
Definition: execnodes.h:206
ExprState * limitOffset
Definition: execnodes.h:1989
ExprState * check_exprstate
Definition: execnodes.h:780
struct MaterialState MaterialState
struct EState * ecxt_estate
Definition: execnodes.h:225
struct ProjectionInfo ProjectionInfo
List * hashkeys
Definition: execnodes.h:1914
struct HashState HashState
ProjectionInfo * ri_projectReturning
Definition: execnodes.h:389
struct TupleHashTableData TupleHashTableData
bool eof_underlying
Definition: execnodes.h:1679
struct FdwRoutine * ri_FdwRoutine
Definition: execnodes.h:382
bool ii_BrokenHotChain
Definition: execnodes.h:149
unsigned int uint32
Definition: c.h:268
PlanState ps
Definition: execnodes.h:1912
int64 bound_Done
Definition: execnodes.h:1695
struct FdwRoutine * fdwroutine
Definition: execnodes.h:1495
struct PlanState * parent
Definition: execnodes.h:727
struct binaryheap * gm_heap
Definition: execnodes.h:1897
AggStatePerHash perhash
Definition: execnodes.h:1766
ScanState ss
Definition: execnodes.h:1689
PlanState ps
Definition: execnodes.h:1866
FmgrInfo * eqfunctions
Definition: execnodes.h:997
MergeJoinClause mj_Clauses
Definition: execnodes.h:1589
dsa_pointer tbmiterator
Definition: execnodes.h:1261
Tuplestorestate * buffer
Definition: execnodes.h:1795
int es_instrument
Definition: execnodes.h:448
struct GatherMergeState GatherMergeState
MemoryContext aggcontext
Definition: execnodes.h:1814
ExprState * repeatable
Definition: execnodes.h:1071
Datum * innermost_caseval
Definition: execnodes.h:92
bool iss_RuntimeKeysReady
Definition: execnodes.h:1140
TupleTableSlot * es_trig_tuple_slot
Definition: execnodes.h:427
TupleHashTable hashtable
Definition: execnodes.h:1000
PlanState * subplan
Definition: execnodes.h:1343
TupleTableSlot * origslot
Definition: execnodes.h:868
struct LockRowsState LockRowsState
struct RecursiveUnionState RecursiveUnionState
bool ii_ReadyForInserts
Definition: execnodes.h:147
Datum(* ExprStateEvalFunc)(struct ExprState *expression, struct ExprContext *econtext, bool *isNull)
Definition: execnodes.h:45
List * hj_HashOperators
Definition: execnodes.h:1644
Bitmapset * grouped_cols
Definition: execnodes.h:1751
struct HashJoinTableData * HashJoinTable
Definition: execnodes.h:1636
ExprState ** ri_ConstraintExprs
Definition: execnodes.h:387
TBMIterateResult * tbmres
Definition: execnodes.h:1297
TriggerDesc * ri_TrigDesc
Definition: execnodes.h:378
struct AggState AggState
ScanKey ioss_OrderByKeys
Definition: execnodes.h:1181
Index rowmarkId
Definition: execnodes.h:505
TupleHashIterator hashiter
Definition: execnodes.h:1945
Bitmapset * chgParam
Definition: execnodes.h:827
struct AggrefExprState AggrefExprState
struct ExprContext_CB * next
Definition: execnodes.h:164
Tuplestorestate * working_table
Definition: execnodes.h:994
bool rs_checkqual
Definition: execnodes.h:884
void * ii_AmCache
Definition: execnodes.h:150
struct AlternativeSubPlanState AlternativeSubPlanState
QueryEnvironment * es_queryEnv
Definition: execnodes.h:435
int hj_CurBucketNo
Definition: execnodes.h:1647
RecursiveUnionState * rustate
Definition: execnodes.h:1480
PlanState ** mt_plans
Definition: execnodes.h:913
struct FunctionScanPerFuncState * funcstates
Definition: execnodes.h:1372
int num_hashes
Definition: execnodes.h:1765
SetFunctionReturnMode
Definition: execnodes.h:248
int64 spooled_rows
Definition: execnodes.h:1797
bool domainValue_isNull
Definition: execnodes.h:222
bool input_done
Definition: execnodes.h:1747
ExprDoneCond
Definition: execnodes.h:235
ExprContext * curaggcontext
Definition: execnodes.h:1745
TupleTableSlot * evalslot
Definition: execnodes.h:1769
ExprContext * hashcontext
Definition: execnodes.h:1742
bool * ecxt_aggnulls
Definition: execnodes.h:214
bool mj_SkipMarkRestore
Definition: execnodes.h:1591
struct NestLoopState NestLoopState
List * es_trig_target_relations
Definition: execnodes.h:426
Plan * plan
Definition: execnodes.h:869
List * es_tupleTable
Definition: execnodes.h:440
LockClauseStrength
Definition: lockoptions.h:21
AggStatePerPhase phase
Definition: execnodes.h:1737
List * es_auxmodifytables
Definition: execnodes.h:455
Datum curArray
Definition: execnodes.h:731
uintptr_t Datum
Definition: postgres.h:372
TupleDesc tupDesc
Definition: execnodes.h:1895
IndexScanDesc biss_ScanDesc
Definition: execnodes.h:1223
ExprContext * rowcontext
Definition: execnodes.h:1397
int ii_NumIndexAttrs
Definition: execnodes.h:134
TupleTableSlot * funnel_slot
Definition: execnodes.h:1873
AggStatePerGroup pergroup
Definition: execnodes.h:1761
List * ri_WithCheckOptions
Definition: execnodes.h:385
TupleTableSlot * mt_partition_tuple_slot
Definition: execnodes.h:937
TupleDesc funcResultDesc
Definition: execnodes.h:683
Expr * expr
Definition: execnodes.h:654
struct TupleHashEntryData * TupleHashEntry
Definition: execnodes.h:551
TupleTableSlot * agg_row_slot
Definition: execnodes.h:1834
int es_num_result_relations
Definition: execnodes.h:422
TIDBitmap * biss_result
Definition: execnodes.h:1213
List * ri_PartitionCheck
Definition: execnodes.h:392
unsigned int Index
Definition: c.h:365
struct TupleQueueReader ** reader
Definition: execnodes.h:1894
FmgrInfo * hashfunctions
Definition: execnodes.h:1934
TupleTableSlot * nl_NullInnerTupleSlot
Definition: execnodes.h:1557
FmgrInfo * eqfunctions
Definition: execnodes.h:1853
Plan * plan
Definition: execnodes.h:803
MemoryContext tempContext
Definition: execnodes.h:1854
MemoryContext hashtempcxt
Definition: execnodes.h:740
bool more_partitions
Definition: execnodes.h:1823
struct SampleScanState SampleScanState
Relation ioss_RelationDesc
Definition: execnodes.h:1187
bool es_finished
Definition: execnodes.h:449
PlanState ps
Definition: execnodes.h:968
void * ri_FdwState
Definition: execnodes.h:383
ExprState * array_expr
Definition: execnodes.h:1096
int allowedModes
Definition: execnodes.h:268
struct EState EState
JoinState js
Definition: execnodes.h:1587
MemoryContext hashtablecxt
Definition: execnodes.h:739
dsa_pointer prefetch_iterator
Definition: execnodes.h:1262
struct binaryheap * ms_heap
Definition: execnodes.h:974
tuplehash_hash * hashtab
Definition: execnodes.h:572
FmgrInfo * ordEqfunctions
Definition: execnodes.h:1794
ScanState ss
Definition: execnodes.h:1131
bool ii_Unique
Definition: execnodes.h:146
struct PlanState PlanState
SetFunctionReturnMode returnMode
Definition: execnodes.h:270
ExprContext ** aggcontexts
Definition: execnodes.h:1743
MemoryContext tableContext
Definition: execnodes.h:1001
TupleTableSlot * ecxt_outertuple
Definition: execnodes.h:199
bool hj_OuterNotEmpty
Definition: execnodes.h:1657
int64 frametailpos
Definition: execnodes.h:1800
List * ii_Expressions
Definition: execnodes.h:136
NodeTag type
Definition: execnodes.h:133
FmgrInfo * tab_eq_funcs
Definition: execnodes.h:744
TupleTableSlot * tableslot
Definition: execnodes.h:580
TupleTableSlot * mj_InnerTupleSlot
Definition: execnodes.h:1599
struct AggStatePerAggData * AggStatePerAgg
Definition: execnodes.h:1723
bool setop_done
Definition: execnodes.h:1935
struct UniqueState UniqueState
FmgrInfo * in_functions
Definition: execnodes.h:1421
TupleTableSlot * subSlot
Definition: execnodes.h:1996
RowMarkType markType
Definition: execnodes.h:506
uint64 es_processed
Definition: execnodes.h:444
int as_whichplan
Definition: execnodes.h:952
#define INDEX_MAX_KEYS
size_t Size
Definition: c.h:356
AggSplit
Definition: nodes.h:756
bool funcReturnsTuple
Definition: execnodes.h:684
ExprContext * mj_OuterEContext
Definition: execnodes.h:1603
struct ParallelBitmapHeapState ParallelBitmapHeapState
bool randomAccess
Definition: execnodes.h:1690
FmgrInfo * eqfunctions
Definition: execnodes.h:1933
RowMarkType
Definition: plannodes.h:944
struct SetOpState SetOpState
SharedBitmapState state
Definition: execnodes.h:1266
bool sort_Done
Definition: execnodes.h:1693
Tuplestorestate * relation
Definition: execnodes.h:1466
ExprState * indexqual
Definition: execnodes.h:1178
TupleTableSlot * ecxt_scantuple
Definition: execnodes.h:197
SetOpStatePerGroup pergroup
Definition: execnodes.h:1939
AttrNumber ii_KeyAttrNumbers[INDEX_MAX_KEYS]
Definition: execnodes.h:135
bool * es_epqTupleSet
Definition: execnodes.h:474
List * es_subplanstates
Definition: execnodes.h:453
struct TsmRoutine * tsmroutine
Definition: execnodes.h:1073
TBMSharedIterator * shared_tbmiterator
Definition: execnodes.h:1306
AttrNumber toidAttNo
Definition: execnodes.h:530
List * es_rowMarks
Definition: execnodes.h:442
ExprContext * iss_RuntimeContext
Definition: execnodes.h:1141
TBMIterator * tbmiterator
Definition: execnodes.h:1296
MemoryContext ecxt_per_query_memory
Definition: execnodes.h:202
TupleTableSlot * mj_NullOuterTupleSlot
Definition: execnodes.h:1601
int numphases
Definition: execnodes.h:1738
struct IndexInfo IndexInfo
bool ii_Concurrent
Definition: execnodes.h:148
FmgrInfo * lhs_hash_funcs
Definition: execnodes.h:745
int64 currentpos
Definition: execnodes.h:1798
ExprState * qual
Definition: execnodes.h:817
Tuplestorestate * setResult
Definition: execnodes.h:273
FmgrInfo * cur_eq_funcs
Definition: execnodes.h:746
List * mt_arbiterindexes
Definition: execnodes.h:921
char phs_snapshot_data[FLEXIBLE_ARRAY_MEMBER]
Definition: execnodes.h:1268
bool setArgsValid
Definition: execnodes.h:700
HeapScanDesc ss_currentScanDesc
Definition: execnodes.h:1049
PlanState * cteplanstate
Definition: execnodes.h:1443
ExprContext * econtext
Definition: execnodes.h:266
struct MergeAppendState MergeAppendState
JoinState js
Definition: execnodes.h:1554
IndexArrayKeyInfo * biss_ArrayKeys
Definition: execnodes.h:1218
List * mt_excludedtlist
Definition: execnodes.h:924
int nextreader
Definition: execnodes.h:1870
TupleTableSlot * funcResultSlot
Definition: execnodes.h:677
TupleTableSlot * hj_HashTupleSlot
Definition: execnodes.h:1651
List * hj_InnerHashKeys
Definition: execnodes.h:1643
Definition: dsa.c:354
bool caseValue_isNull
Definition: execnodes.h:218
bool partition_spooled
Definition: execnodes.h:1820
Oid * ii_ExclusionOps
Definition: execnodes.h:140
AggStrategy
Definition: nodes.h:734
struct TidScanState TidScanState
TupleDesc setDesc
Definition: execnodes.h:274
ConditionVariable cv
Definition: execnodes.h:1267
ExprState * elidedFuncState
Definition: execnodes.h:662
struct ReturnSetInfo ReturnSetInfo
int steps_alloc
Definition: execnodes.h:90
struct GatherState GatherState
HashJoinTable hj_HashTable
Definition: execnodes.h:1645
int es_top_eflags
Definition: execnodes.h:447
FmgrInfo * eqfunctions
Definition: execnodes.h:1706
AggStatePerAgg peragg
Definition: execnodes.h:1740
bool framehead_valid
Definition: execnodes.h:1825
int steps_len
Definition: execnodes.h:89
PlanState ** appendplans
Definition: execnodes.h:950
TBMIterator * prefetch_iterator
Definition: execnodes.h:1300
int as_nplans
Definition: execnodes.h:951
struct DomainConstraintState DomainConstraintState
IndexInfo ** ri_IndexRelationInfo
Definition: execnodes.h:377
struct PartitionDispatchData ** mt_partition_dispatch_info
Definition: execnodes.h:928
List * lr_arowMarks
Definition: execnodes.h:1957
struct ExprContext_CB ExprContext_CB
NodeTag type
Definition: execnodes.h:724
bool * es_epqScanDone
Definition: execnodes.h:475
struct JunkFilter JunkFilter
ExprDoneCond * elemdone
Definition: execnodes.h:898
uint8 flags
Definition: execnodes.h:57
NodeTag type
Definition: execnodes.h:405
ExprState pi_state
Definition: execnodes.h:296
void * arg
AggStatePerTrans curpertrans
Definition: execnodes.h:1746
int epqParam
Definition: execnodes.h:871
ParamListInfo es_param_list_info
Definition: execnodes.h:432
FmgrInfo * cur_eq_funcs
Definition: execnodes.h:584
List * es_exprcontexts
Definition: execnodes.h:451
MemoryContext tempcxt
Definition: execnodes.h:578
ProjectionInfo * projRight
Definition: execnodes.h:734
MemoryContext partcontext
Definition: execnodes.h:1813
struct CteScanState CteScanState
TupleConversionMap ** mt_partition_tupconv_maps
Definition: execnodes.h:935
ExprDoneCond isDone
Definition: execnodes.h:271
struct ResultState ResultState
WindowFunc * wfunc
Definition: execnodes.h:635
List * aggs
Definition: execnodes.h:1732
ExprContext * biss_RuntimeContext
Definition: execnodes.h:1221
bool mj_ExtraMarks
Definition: execnodes.h:1592
EState * estate
Definition: execnodes.h:866
Datum * iss_OrderByValues
Definition: execnodes.h:1148
uint16 * ii_ExclusionStrats
Definition: execnodes.h:142
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:160
struct BitmapIndexScanState BitmapIndexScanState
ParamListInfo ecxt_param_list_info
Definition: execnodes.h:207
int iss_NumOrderByKeys
Definition: execnodes.h:1137
Tuplestorestate * cte_table
Definition: execnodes.h:1447
List ** exprlists
Definition: execnodes.h:1398
ExprContext * pi_exprContext
Definition: execnodes.h:298
IndexScanDesc iss_ScanDesc
Definition: execnodes.h:1143
struct AppendState AppendState
struct SortState SortState
Definition: pg_list.h:45
Tuplestorestate * tupstore
Definition: execnodes.h:1425
int Buffer
Definition: buf.h:23
OnConflictAction
Definition: nodes.h:798
bool havehashrows
Definition: execnodes.h:737
Datum resvalue
Definition: execnodes.h:64
int16 AttrNumber
Definition: attnum.h:21
ExprState * rowexpr
Definition: execnodes.h:1413
JoinState js
Definition: execnodes.h:1640
struct IndexOnlyScanState IndexOnlyScanState
LockWaitPolicy
Definition: lockoptions.h:36
CmdType
Definition: nodes.h:648
TupleHashTable hashnulls
Definition: execnodes.h:736
AttrNumber ctidAttNo
Definition: execnodes.h:529
RelationPtr ri_IndexRelationDescs
Definition: execnodes.h:376
PlanState ps
Definition: execnodes.h:1988
struct SubPlanState SubPlanState
TBMSharedIterator * shared_prefetch_iterator
Definition: execnodes.h:1307
struct IndexScanState IndexScanState
TupleHashTable hashtable
Definition: execnodes.h:1942
ExprState * hashclauses
Definition: execnodes.h:1641
FmgrInfo * ri_TrigFunctions
Definition: execnodes.h:379
struct ForeignScanState ForeignScanState
struct BitmapOrState BitmapOrState
Relation iss_RelationDesc
Definition: execnodes.h:1142
List ** mt_arowmarks
Definition: execnodes.h:917
TupleTableSlot * mj_OuterTupleSlot
Definition: execnodes.h:1598
SortSupport gm_sortkeys
Definition: execnodes.h:1901
pairingheap * iss_ReorderQueue
Definition: execnodes.h:1146
FmgrInfo * tab_eq_funcs
Definition: execnodes.h:576
struct LimitState LimitState
struct WorkTableScanState WorkTableScanState
struct JoinState JoinState
PlanState ps
Definition: execnodes.h:881
ScanState ss
Definition: execnodes.h:1069
ScanKey iss_OrderByKeys
Definition: execnodes.h:1136
ResultRelInfo * es_result_relation_info
Definition: execnodes.h:423