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