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