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