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