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