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