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  * These fields are for re-evaluating plan quals when an updated tuple is
575  * substituted in READ COMMITTED mode. es_epqTupleSlot[] contains test
576  * tuples that scan plan nodes should return instead of whatever they'd
577  * normally return, or an empty slot if there is nothing to return; if
578  * es_epqTupleSlot[] is not NULL if a particular array entry is valid; and
579  * es_epqScanDone[] is state to remember if the tuple has been returned
580  * already. Arrays are of size es_range_table_size and are indexed by
581  * scan node scanrelid - 1.
582  */
583  TupleTableSlot **es_epqTupleSlot; /* array of EPQ substitute tuples */
584  bool *es_epqScanDone; /* true if EPQ tuple has been fetched */
585 
586  bool es_use_parallel_mode; /* can we use parallel workers? */
587 
588  /* The per-query shared memory area to use for parallel execution. */
590 
591  /*
592  * JIT information. es_jit_flags indicates whether JIT should be performed
593  * and with which options. es_jit is created on-demand when JITing is
594  * performed.
595  *
596  * es_jit_worker_instr is the combined, on demand allocated,
597  * instrumentation from all workers. The leader's instrumentation is kept
598  * separate, and is combined on demand by ExplainPrintJITSummary().
599  */
603 } EState;
604 
605 
606 /*
607  * ExecRowMark -
608  * runtime representation of FOR [KEY] UPDATE/SHARE clauses
609  *
610  * When doing UPDATE, DELETE, or SELECT FOR [KEY] UPDATE/SHARE, we will have an
611  * ExecRowMark for each non-target relation in the query (except inheritance
612  * parent RTEs, which can be ignored at runtime). Virtual relations such as
613  * subqueries-in-FROM will have an ExecRowMark with relation == NULL. See
614  * PlanRowMark for details about most of the fields. In addition to fields
615  * directly derived from PlanRowMark, we store an activity flag (to denote
616  * inactive children of inheritance trees), curCtid, which is used by the
617  * WHERE CURRENT OF code, and ermExtra, which is available for use by the plan
618  * node that sources the relation (e.g., for a foreign table the FDW can use
619  * ermExtra to hold information).
620  *
621  * EState->es_rowmarks is an array of these structs, indexed by RT index,
622  * with NULLs for irrelevant RT indexes. es_rowmarks itself is NULL if
623  * there are no rowmarks.
624  */
625 typedef struct ExecRowMark
626 {
627  Relation relation; /* opened and suitably locked relation */
628  Oid relid; /* its OID (or InvalidOid, if subquery) */
629  Index rti; /* its range table index */
630  Index prti; /* parent range table index, if child */
631  Index rowmarkId; /* unique identifier for resjunk columns */
632  RowMarkType markType; /* see enum in nodes/plannodes.h */
633  LockClauseStrength strength; /* LockingClause's strength, or LCS_NONE */
634  LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
635  bool ermActive; /* is this mark relevant for current tuple? */
636  ItemPointerData curCtid; /* ctid of currently locked tuple, if any */
637  void *ermExtra; /* available for use by relation source node */
638 } ExecRowMark;
639 
640 /*
641  * ExecAuxRowMark -
642  * additional runtime representation of FOR [KEY] UPDATE/SHARE clauses
643  *
644  * Each LockRows and ModifyTable node keeps a list of the rowmarks it needs to
645  * deal with. In addition to a pointer to the related entry in es_rowmarks,
646  * this struct carries the column number(s) of the resjunk columns associated
647  * with the rowmark (see comments for PlanRowMark for more detail). In the
648  * case of ModifyTable, there has to be a separate ExecAuxRowMark list for
649  * each child plan, because the resjunk columns could be at different physical
650  * column positions in different subplans.
651  */
652 typedef struct ExecAuxRowMark
653 {
654  ExecRowMark *rowmark; /* related entry in es_rowmarks */
655  AttrNumber ctidAttNo; /* resno of ctid junk attribute, if any */
656  AttrNumber toidAttNo; /* resno of tableoid junk attribute, if any */
657  AttrNumber wholeAttNo; /* resno of whole-row junk attribute, if any */
659 
660 
661 /* ----------------------------------------------------------------
662  * Tuple Hash Tables
663  *
664  * All-in-memory tuple hash tables are used for a number of purposes.
665  *
666  * Note: tab_hash_funcs are for the key datatype(s) stored in the table,
667  * and tab_eq_funcs are non-cross-type equality operators for those types.
668  * Normally these are the only functions used, but FindTupleHashEntry()
669  * supports searching a hashtable using cross-data-type hashing. For that,
670  * the caller must supply hash functions for the LHS datatype as well as
671  * the cross-type equality operators to use. in_hash_funcs and cur_eq_func
672  * are set to point to the caller's function arrays while doing such a search.
673  * During LookupTupleHashEntry(), they point to tab_hash_funcs and
674  * tab_eq_func respectively.
675  * ----------------------------------------------------------------
676  */
679 
680 typedef struct TupleHashEntryData
681 {
682  MinimalTuple firstTuple; /* copy of first tuple in this group */
683  void *additional; /* user data */
684  uint32 status; /* hash status */
685  uint32 hash; /* hash value (cached) */
687 
688 /* define parameters necessary to generate the tuple hash table interface */
689 #define SH_PREFIX tuplehash
690 #define SH_ELEMENT_TYPE TupleHashEntryData
691 #define SH_KEY_TYPE MinimalTuple
692 #define SH_SCOPE extern
693 #define SH_DECLARE
694 #include "lib/simplehash.h"
695 
696 typedef struct TupleHashTableData
697 {
698  tuplehash_hash *hashtab; /* underlying hash table */
699  int numCols; /* number of columns in lookup key */
700  AttrNumber *keyColIdx; /* attr numbers of key columns */
701  FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
702  ExprState *tab_eq_func; /* comparator for table datatype(s) */
703  Oid *tab_collations; /* collations for hash and comparison */
704  MemoryContext tablecxt; /* memory context containing table */
705  MemoryContext tempcxt; /* context for function evaluations */
706  Size entrysize; /* actual size to make each hash entry */
707  TupleTableSlot *tableslot; /* slot for referencing table entries */
708  /* The following fields are set transiently for each table search: */
709  TupleTableSlot *inputslot; /* current input tuple's slot */
710  FmgrInfo *in_hash_funcs; /* hash functions for input datatype(s) */
711  ExprState *cur_eq_func; /* comparator for input vs. table */
712  uint32 hash_iv; /* hash-function IV */
713  ExprContext *exprcontext; /* expression context */
715 
716 typedef tuplehash_iterator TupleHashIterator;
717 
718 /*
719  * Use InitTupleHashIterator/TermTupleHashIterator for a read/write scan.
720  * Use ResetTupleHashIterator if the table can be frozen (in this case no
721  * explicit scan termination is needed).
722  */
723 #define InitTupleHashIterator(htable, iter) \
724  tuplehash_start_iterate(htable->hashtab, iter)
725 #define TermTupleHashIterator(iter) \
726  ((void) 0)
727 #define ResetTupleHashIterator(htable, iter) \
728  InitTupleHashIterator(htable, iter)
729 #define ScanTupleHashTable(htable, iter) \
730  tuplehash_iterate(htable->hashtab, iter)
731 
732 
733 /* ----------------------------------------------------------------
734  * Expression State Nodes
735  *
736  * Formerly, there was a separate executor expression state node corresponding
737  * to each node in a planned expression tree. That's no longer the case; for
738  * common expression node types, all the execution info is embedded into
739  * step(s) in a single ExprState node. But we still have a few executor state
740  * node types for selected expression node types, mostly those in which info
741  * has to be shared with other parts of the execution state tree.
742  * ----------------------------------------------------------------
743  */
744 
745 /* ----------------
746  * AggrefExprState node
747  * ----------------
748  */
749 typedef struct AggrefExprState
750 {
752  Aggref *aggref; /* expression plan node */
753  int aggno; /* ID number for agg within its plan node */
755 
756 /* ----------------
757  * WindowFuncExprState node
758  * ----------------
759  */
760 typedef struct WindowFuncExprState
761 {
763  WindowFunc *wfunc; /* expression plan node */
764  List *args; /* ExprStates for argument expressions */
765  ExprState *aggfilter; /* FILTER expression */
766  int wfuncno; /* ID number for wfunc within its plan node */
768 
769 
770 /* ----------------
771  * SetExprState node
772  *
773  * State for evaluating a potentially set-returning expression (like FuncExpr
774  * or OpExpr). In some cases, like some of the expressions in ROWS FROM(...)
775  * the expression might not be a SRF, but nonetheless it uses the same
776  * machinery as SRFs; it will be treated as a SRF returning a single row.
777  * ----------------
778  */
779 typedef struct SetExprState
780 {
782  Expr *expr; /* expression plan node */
783  List *args; /* ExprStates for argument expressions */
784 
785  /*
786  * In ROWS FROM, functions can be inlined, removing the FuncExpr normally
787  * inside. In such a case this is the compiled expression (which cannot
788  * return a set), which'll be evaluated using regular ExecEvalExpr().
789  */
791 
792  /*
793  * Function manager's lookup info for the target function. If func.fn_oid
794  * is InvalidOid, we haven't initialized it yet (nor any of the following
795  * fields, except funcReturnsSet).
796  */
798 
799  /*
800  * For a set-returning function (SRF) that returns a tuplestore, we keep
801  * the tuplestore here and dole out the result rows one at a time. The
802  * slot holds the row currently being returned.
803  */
806 
807  /*
808  * In some cases we need to compute a tuple descriptor for the function's
809  * output. If so, it's stored here.
810  */
812  bool funcReturnsTuple; /* valid when funcResultDesc isn't NULL */
813 
814  /*
815  * Remember whether the function is declared to return a set. This is set
816  * by ExecInitExpr, and is valid even before the FmgrInfo is set up.
817  */
819 
820  /*
821  * setArgsValid is true when we are evaluating a set-returning function
822  * that uses value-per-call mode and we are in the middle of a call
823  * series; we want to pass the same argument values to the function again
824  * (and again, until it returns ExprEndResult). This indicates that
825  * fcinfo_data already contains valid argument data.
826  */
828 
829  /*
830  * Flag to remember whether we have registered a shutdown callback for
831  * this SetExprState. We do so only if funcResultStore or setArgsValid
832  * has been set at least once (since all the callback is for is to release
833  * the tuplestore or clear setArgsValid).
834  */
835  bool shutdown_reg; /* a shutdown callback is registered */
836 
837  /*
838  * Call parameter structure for the function. This has been initialized
839  * (by InitFunctionCallInfoData) if func.fn_oid is valid. It also saves
840  * argument values between calls, when setArgsValid is true.
841  */
843 } SetExprState;
844 
845 /* ----------------
846  * SubPlanState node
847  * ----------------
848  */
849 typedef struct SubPlanState
850 {
852  SubPlan *subplan; /* expression plan node */
853  struct PlanState *planstate; /* subselect plan's state tree */
854  struct PlanState *parent; /* parent plan node's state tree */
855  ExprState *testexpr; /* state of combining expression */
856  List *args; /* states of argument expression(s) */
857  HeapTuple curTuple; /* copy of most recent tuple from subplan */
858  Datum curArray; /* most recent array from ARRAY() subplan */
859  /* these are used when hashing the subselect's output: */
860  TupleDesc descRight; /* subselect desc after projection */
861  ProjectionInfo *projLeft; /* for projecting lefthand exprs */
862  ProjectionInfo *projRight; /* for projecting subselect output */
863  TupleHashTable hashtable; /* hash table for no-nulls subselect rows */
864  TupleHashTable hashnulls; /* hash table for rows with null(s) */
865  bool havehashrows; /* true if hashtable is not empty */
866  bool havenullrows; /* true if hashnulls is not empty */
867  MemoryContext hashtablecxt; /* memory context containing hash tables */
868  MemoryContext hashtempcxt; /* temp memory context for hash tables */
869  ExprContext *innerecontext; /* econtext for computing inner tuples */
870  AttrNumber *keyColIdx; /* control data for hash tables */
871  Oid *tab_eq_funcoids; /* equality func oids for table
872  * datatype(s) */
873  Oid *tab_collations; /* collations for hash and comparison */
874  FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
875  FmgrInfo *tab_eq_funcs; /* equality functions for table datatype(s) */
876  FmgrInfo *lhs_hash_funcs; /* hash functions for lefthand datatype(s) */
877  FmgrInfo *cur_eq_funcs; /* equality functions for LHS vs. table */
878  ExprState *cur_eq_comp; /* equality comparator for LHS vs. table */
879 } SubPlanState;
880 
881 /* ----------------
882  * AlternativeSubPlanState node
883  * ----------------
884  */
886 {
888  AlternativeSubPlan *subplan; /* expression plan node */
889  List *subplans; /* SubPlanStates of alternative subplans */
890  int active; /* list index of the one we're using */
892 
893 /*
894  * DomainConstraintState - one item to check during CoerceToDomain
895  *
896  * Note: we consider this to be part of an ExprState tree, so we give it
897  * a name following the xxxState convention. But there's no directly
898  * associated plan-tree node.
899  */
901 {
905 
906 typedef struct DomainConstraintState
907 {
909  DomainConstraintType constrainttype; /* constraint type */
910  char *name; /* name of constraint (for error msgs) */
911  Expr *check_expr; /* for CHECK, a boolean expression */
912  ExprState *check_exprstate; /* check_expr's eval state, or NULL */
914 
915 
916 /* ----------------------------------------------------------------
917  * Executor State Trees
918  *
919  * An executing query has a PlanState tree paralleling the Plan tree
920  * that describes the plan.
921  * ----------------------------------------------------------------
922  */
923 
924 /* ----------------
925  * ExecProcNodeMtd
926  *
927  * This is the method called by ExecProcNode to return the next tuple
928  * from an executor node. It returns NULL, or an empty TupleTableSlot,
929  * if no more tuples are available.
930  * ----------------
931  */
932 typedef TupleTableSlot *(*ExecProcNodeMtd) (struct PlanState *pstate);
933 
934 /* ----------------
935  * PlanState node
936  *
937  * We never actually instantiate any PlanState nodes; this is just the common
938  * abstract superclass for all PlanState-type nodes.
939  * ----------------
940  */
941 typedef struct PlanState
942 {
944 
945  Plan *plan; /* associated Plan node */
946 
947  EState *state; /* at execution time, states of individual
948  * nodes point to one EState for the whole
949  * top-level plan */
950 
951  ExecProcNodeMtd ExecProcNode; /* function to return next tuple */
952  ExecProcNodeMtd ExecProcNodeReal; /* actual function, if above is a
953  * wrapper */
954 
955  Instrumentation *instrument; /* Optional runtime stats for this node */
956  WorkerInstrumentation *worker_instrument; /* per-worker instrumentation */
957 
958  /* Per-worker JIT instrumentation */
960 
961  /*
962  * Common structural data for all Plan types. These links to subsidiary
963  * state trees parallel links in the associated plan tree (except for the
964  * subPlan list, which does not exist in the plan tree).
965  */
966  ExprState *qual; /* boolean qual condition */
967  struct PlanState *lefttree; /* input plan tree(s) */
969 
970  List *initPlan; /* Init SubPlanState nodes (un-correlated expr
971  * subselects) */
972  List *subPlan; /* SubPlanState nodes in my expressions */
973 
974  /*
975  * State for management of parameter-change-driven rescanning
976  */
977  Bitmapset *chgParam; /* set of IDs of changed Params */
978 
979  /*
980  * Other run-time state needed by most if not all node types.
981  */
982  TupleDesc ps_ResultTupleDesc; /* node's return type */
983  TupleTableSlot *ps_ResultTupleSlot; /* slot for my result tuples */
984  ExprContext *ps_ExprContext; /* node's expression-evaluation context */
985  ProjectionInfo *ps_ProjInfo; /* info for doing tuple projection */
986 
987  /*
988  * Scanslot's descriptor if known. This is a bit of a hack, but otherwise
989  * it's hard for expression compilation to optimize based on the
990  * descriptor, without encoding knowledge about all executor nodes.
991  */
993 
994  /*
995  * Define the slot types for inner, outer and scanslots for expression
996  * contexts with this state as a parent. If *opsset is set, then
997  * *opsfixed indicates whether *ops is guaranteed to be the type of slot
998  * used. That means that every slot in the corresponding
999  * ExprContext.ecxt_*tuple will point to a slot of that type, while
1000  * evaluating the expression. If *opsfixed is false, but *ops is set,
1001  * that indicates the most likely type of slot.
1002  *
1003  * The scan* fields are set by ExecInitScanTupleSlot(). If that's not
1004  * called, nodes can initialize the fields themselves.
1005  *
1006  * If outer/inneropsset is false, the information is inferred on-demand
1007  * using ExecGetResultSlotOps() on ->righttree/lefttree, using the
1008  * corresponding node's resultops* fields.
1009  *
1010  * The result* fields are automatically set when ExecInitResultSlot is
1011  * used (be it directly or when the slot is created by
1012  * ExecAssignScanProjectionInfo() /
1013  * ExecConditionalAssignProjectionInfo()). If no projection is necessary
1014  * ExecConditionalAssignProjectionInfo() defaults those fields to the scan
1015  * operations.
1016  */
1029 } PlanState;
1030 
1031 /* ----------------
1032  * these are defined to avoid confusion problems with "left"
1033  * and "right" and "inner" and "outer". The convention is that
1034  * the "left" plan is the "outer" plan and the "right" plan is
1035  * the inner plan, but these make the code more readable.
1036  * ----------------
1037  */
1038 #define innerPlanState(node) (((PlanState *)(node))->righttree)
1039 #define outerPlanState(node) (((PlanState *)(node))->lefttree)
1040 
1041 /* Macros for inline access to certain instrumentation counters */
1042 #define InstrCountTuples2(node, delta) \
1043  do { \
1044  if (((PlanState *)(node))->instrument) \
1045  ((PlanState *)(node))->instrument->ntuples2 += (delta); \
1046  } while (0)
1047 #define InstrCountFiltered1(node, delta) \
1048  do { \
1049  if (((PlanState *)(node))->instrument) \
1050  ((PlanState *)(node))->instrument->nfiltered1 += (delta); \
1051  } while(0)
1052 #define InstrCountFiltered2(node, delta) \
1053  do { \
1054  if (((PlanState *)(node))->instrument) \
1055  ((PlanState *)(node))->instrument->nfiltered2 += (delta); \
1056  } while(0)
1057 
1058 /*
1059  * EPQState is state for executing an EvalPlanQual recheck on a candidate
1060  * tuple in ModifyTable or LockRows. The estate and planstate fields are
1061  * NULL if inactive.
1062  */
1063 typedef struct EPQState
1064 {
1065  EState *estate; /* subsidiary EState */
1066  PlanState *planstate; /* plan state tree ready to be executed */
1067  TupleTableSlot *origslot; /* original output tuple to be rechecked */
1068  Plan *plan; /* plan tree to be executed */
1069  List *arowMarks; /* ExecAuxRowMarks (non-locking only) */
1070  int epqParam; /* ID of Param to force scan node re-eval */
1071 } EPQState;
1072 
1073 
1074 /* ----------------
1075  * ResultState information
1076  * ----------------
1077  */
1078 typedef struct ResultState
1079 {
1080  PlanState ps; /* its first field is NodeTag */
1082  bool rs_done; /* are we done? */
1083  bool rs_checkqual; /* do we need to check the qual? */
1084 } ResultState;
1085 
1086 /* ----------------
1087  * ProjectSetState information
1088  *
1089  * Note: at least one of the "elems" will be a SetExprState; the rest are
1090  * regular ExprStates.
1091  * ----------------
1092  */
1093 typedef struct ProjectSetState
1094 {
1095  PlanState ps; /* its first field is NodeTag */
1096  Node **elems; /* array of expression states */
1097  ExprDoneCond *elemdone; /* array of per-SRF is-done states */
1098  int nelems; /* length of elemdone[] array */
1099  bool pending_srf_tuples; /* still evaluating srfs in tlist? */
1100  MemoryContext argcontext; /* context for SRF arguments */
1101 } ProjectSetState;
1102 
1103 /* ----------------
1104  * ModifyTableState information
1105  * ----------------
1106  */
1107 typedef struct ModifyTableState
1108 {
1109  PlanState ps; /* its first field is NodeTag */
1110  CmdType operation; /* INSERT, UPDATE, or DELETE */
1111  bool canSetTag; /* do we set the command tag/es_processed? */
1112  bool mt_done; /* are we done? */
1113  PlanState **mt_plans; /* subplans (one per target rel) */
1114  int mt_nplans; /* number of plans in the array */
1115  int mt_whichplan; /* which one is being executed (0..n-1) */
1116  TupleTableSlot **mt_scans; /* input tuple corresponding to underlying
1117  * plans */
1118  ResultRelInfo *resultRelInfo; /* per-subplan target relations */
1119  ResultRelInfo *rootResultRelInfo; /* root target relation (partitioned
1120  * table root) */
1121  List **mt_arowmarks; /* per-subplan ExecAuxRowMark lists */
1122  EPQState mt_epqstate; /* for evaluating EvalPlanQual rechecks */
1123  bool fireBSTriggers; /* do we need to fire stmt triggers? */
1124  List *mt_excludedtlist; /* the excluded pseudo relation's tlist */
1125 
1126  /*
1127  * Slot for storing tuples in the root partitioned table's rowtype during
1128  * an UPDATE of a partitioned table.
1129  */
1131 
1132  /* Tuple-routing support info */
1134 
1135  /* controls transition table population for specified operation */
1137 
1138  /* controls transition table population for INSERT...ON CONFLICT UPDATE */
1140 
1141  /* Per plan map for tuple conversion from child to root */
1144 
1145 /* ----------------
1146  * AppendState information
1147  *
1148  * nplans how many plans are in the array
1149  * whichplan which plan is being executed (0 .. n-1), or a
1150  * special negative value. See nodeAppend.c.
1151  * prune_state details required to allow partitions to be
1152  * eliminated from the scan, or NULL if not possible.
1153  * valid_subplans for runtime pruning, valid appendplans indexes to
1154  * scan.
1155  * ----------------
1156  */
1157 
1158 struct AppendState;
1159 typedef struct AppendState AppendState;
1160 struct ParallelAppendState;
1162 struct PartitionPruneState;
1163 
1165 {
1166  PlanState ps; /* its first field is NodeTag */
1167  PlanState **appendplans; /* array of PlanStates for my inputs */
1170  int as_first_partial_plan; /* Index of 'appendplans' containing
1171  * the first partial plan */
1172  ParallelAppendState *as_pstate; /* parallel coordination info */
1173  Size pstate_len; /* size of parallel coordination info */
1176  bool (*choose_next_subplan) (AppendState *);
1177 };
1178 
1179 /* ----------------
1180  * MergeAppendState information
1181  *
1182  * nplans how many plans are in the array
1183  * nkeys number of sort key columns
1184  * sortkeys sort keys in SortSupport representation
1185  * slots current output tuple of each subplan
1186  * heap heap of active tuples
1187  * initialized true if we have fetched first tuple from each subplan
1188  * noopscan true if partition pruning proved that none of the
1189  * mergeplans can contain a record to satisfy this query.
1190  * prune_state details required to allow partitions to be
1191  * eliminated from the scan, or NULL if not possible.
1192  * valid_subplans for runtime pruning, valid mergeplans indexes to
1193  * scan.
1194  * ----------------
1195  */
1196 typedef struct MergeAppendState
1197 {
1198  PlanState ps; /* its first field is NodeTag */
1199  PlanState **mergeplans; /* array of PlanStates for my inputs */
1202  SortSupport ms_sortkeys; /* array of length ms_nkeys */
1203  TupleTableSlot **ms_slots; /* array of length ms_nplans */
1204  struct binaryheap *ms_heap; /* binary heap of slot indices */
1205  bool ms_initialized; /* are subplans started? */
1210 
1211 /* ----------------
1212  * RecursiveUnionState information
1213  *
1214  * RecursiveUnionState is used for performing a recursive union.
1215  *
1216  * recursing T when we're done scanning the non-recursive term
1217  * intermediate_empty T if intermediate_table is currently empty
1218  * working_table working table (to be scanned by recursive term)
1219  * intermediate_table current recursive output (next generation of WT)
1220  * ----------------
1221  */
1222 typedef struct RecursiveUnionState
1223 {
1224  PlanState ps; /* its first field is NodeTag */
1229  /* Remaining fields are unused in UNION ALL case */
1230  Oid *eqfuncoids; /* per-grouping-field equality fns */
1231  FmgrInfo *hashfunctions; /* per-grouping-field hash fns */
1232  MemoryContext tempContext; /* short-term context for comparisons */
1233  TupleHashTable hashtable; /* hash table for tuples already seen */
1234  MemoryContext tableContext; /* memory context containing hash table */
1236 
1237 /* ----------------
1238  * BitmapAndState information
1239  * ----------------
1240  */
1241 typedef struct BitmapAndState
1242 {
1243  PlanState ps; /* its first field is NodeTag */
1244  PlanState **bitmapplans; /* array of PlanStates for my inputs */
1245  int nplans; /* number of input plans */
1246 } BitmapAndState;
1247 
1248 /* ----------------
1249  * BitmapOrState information
1250  * ----------------
1251  */
1252 typedef struct BitmapOrState
1253 {
1254  PlanState ps; /* its first field is NodeTag */
1255  PlanState **bitmapplans; /* array of PlanStates for my inputs */
1256  int nplans; /* number of input plans */
1257 } BitmapOrState;
1258 
1259 /* ----------------------------------------------------------------
1260  * Scan State Information
1261  * ----------------------------------------------------------------
1262  */
1263 
1264 /* ----------------
1265  * ScanState information
1266  *
1267  * ScanState extends PlanState for node types that represent
1268  * scans of an underlying relation. It can also be used for nodes
1269  * that scan the output of an underlying plan node --- in that case,
1270  * only ScanTupleSlot is actually useful, and it refers to the tuple
1271  * retrieved from the subplan.
1272  *
1273  * currentRelation relation being scanned (NULL if none)
1274  * currentScanDesc current scan descriptor for scan (NULL if none)
1275  * ScanTupleSlot pointer to slot in tuple table holding scan tuple
1276  * ----------------
1277  */
1278 typedef struct ScanState
1279 {
1280  PlanState ps; /* its first field is NodeTag */
1284 } ScanState;
1285 
1286 /* ----------------
1287  * SeqScanState information
1288  * ----------------
1289  */
1290 typedef struct SeqScanState
1291 {
1292  ScanState ss; /* its first field is NodeTag */
1293  Size pscan_len; /* size of parallel heap scan descriptor */
1294 } SeqScanState;
1295 
1296 /* ----------------
1297  * SampleScanState information
1298  * ----------------
1299  */
1300 typedef struct SampleScanState
1301 {
1303  List *args; /* expr states for TABLESAMPLE params */
1304  ExprState *repeatable; /* expr state for REPEATABLE expr */
1305  /* use struct pointer to avoid including tsmapi.h here */
1306  struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */
1307  void *tsm_state; /* tablesample method can keep state here */
1308  bool use_bulkread; /* use bulkread buffer access strategy? */
1309  bool use_pagemode; /* use page-at-a-time visibility checking? */
1310  bool begun; /* false means need to call BeginSampleScan */
1311  uint32 seed; /* random seed */
1312  int64 donetuples; /* number of tuples already returned */
1313  bool haveblock; /* has a block for sampling been determined */
1314  bool done; /* exhausted all tuples? */
1315 } SampleScanState;
1316 
1317 /*
1318  * These structs store information about index quals that don't have simple
1319  * constant right-hand sides. See comments for ExecIndexBuildScanKeys()
1320  * for discussion.
1321  */
1322 typedef struct
1323 {
1324  struct ScanKeyData *scan_key; /* scankey to put value into */
1325  ExprState *key_expr; /* expr to evaluate to get value */
1326  bool key_toastable; /* is expr's result a toastable datatype? */
1328 
1329 typedef struct
1330 {
1331  struct ScanKeyData *scan_key; /* scankey to put value into */
1332  ExprState *array_expr; /* expr to evaluate to get array value */
1333  int next_elem; /* next array element to use */
1334  int num_elems; /* number of elems in current array value */
1335  Datum *elem_values; /* array of num_elems Datums */
1336  bool *elem_nulls; /* array of num_elems is-null flags */
1338 
1339 /* ----------------
1340  * IndexScanState information
1341  *
1342  * indexqualorig execution state for indexqualorig expressions
1343  * indexorderbyorig execution state for indexorderbyorig expressions
1344  * ScanKeys Skey structures for index quals
1345  * NumScanKeys number of ScanKeys
1346  * OrderByKeys Skey structures for index ordering operators
1347  * NumOrderByKeys number of OrderByKeys
1348  * RuntimeKeys info about Skeys that must be evaluated at runtime
1349  * NumRuntimeKeys number of RuntimeKeys
1350  * RuntimeKeysReady true if runtime Skeys have been computed
1351  * RuntimeContext expr context for evaling runtime Skeys
1352  * RelationDesc index relation descriptor
1353  * ScanDesc index scan descriptor
1354  *
1355  * ReorderQueue tuples that need reordering due to re-check
1356  * ReachedEnd have we fetched all tuples from index already?
1357  * OrderByValues values of ORDER BY exprs of last fetched tuple
1358  * OrderByNulls null flags for OrderByValues
1359  * SortSupport for reordering ORDER BY exprs
1360  * OrderByTypByVals is the datatype of order by expression pass-by-value?
1361  * OrderByTypLens typlens of the datatypes of order by expressions
1362  * PscanLen size of parallel index scan descriptor
1363  * ----------------
1364  */
1365 typedef struct IndexScanState
1366 {
1367  ScanState ss; /* its first field is NodeTag */
1380 
1381  /* These are needed for re-checking ORDER BY expr ordering */
1390 } IndexScanState;
1391 
1392 /* ----------------
1393  * IndexOnlyScanState information
1394  *
1395  * indexqual execution state for indexqual expressions
1396  * ScanKeys Skey structures for index quals
1397  * NumScanKeys number of ScanKeys
1398  * OrderByKeys Skey structures for index ordering operators
1399  * NumOrderByKeys number of OrderByKeys
1400  * RuntimeKeys info about Skeys that must be evaluated at runtime
1401  * NumRuntimeKeys number of RuntimeKeys
1402  * RuntimeKeysReady true if runtime Skeys have been computed
1403  * RuntimeContext expr context for evaling runtime Skeys
1404  * RelationDesc index relation descriptor
1405  * ScanDesc index scan descriptor
1406  * TableSlot slot for holding tuples fetched from the table
1407  * VMBuffer buffer in use for visibility map testing, if any
1408  * PscanLen size of parallel index-only scan descriptor
1409  * ----------------
1410  */
1411 typedef struct IndexOnlyScanState
1412 {
1413  ScanState ss; /* its first field is NodeTag */
1429 
1430 /* ----------------
1431  * BitmapIndexScanState information
1432  *
1433  * result bitmap to return output into, or NULL
1434  * ScanKeys Skey structures for index quals
1435  * NumScanKeys number of ScanKeys
1436  * RuntimeKeys info about Skeys that must be evaluated at runtime
1437  * NumRuntimeKeys number of RuntimeKeys
1438  * ArrayKeys info about Skeys that come from ScalarArrayOpExprs
1439  * NumArrayKeys number of ArrayKeys
1440  * RuntimeKeysReady true if runtime Skeys have been computed
1441  * RuntimeContext expr context for evaling runtime Skeys
1442  * RelationDesc index relation descriptor
1443  * ScanDesc index scan descriptor
1444  * ----------------
1445  */
1446 typedef struct BitmapIndexScanState
1447 {
1448  ScanState ss; /* its first field is NodeTag */
1461 
1462 /* ----------------
1463  * SharedBitmapState information
1464  *
1465  * BM_INITIAL TIDBitmap creation is not yet started, so first worker
1466  * to see this state will set the state to BM_INPROGRESS
1467  * and that process will be responsible for creating
1468  * TIDBitmap.
1469  * BM_INPROGRESS TIDBitmap creation is in progress; workers need to
1470  * sleep until it's finished.
1471  * BM_FINISHED TIDBitmap creation is done, so now all workers can
1472  * proceed to iterate over TIDBitmap.
1473  * ----------------
1474  */
1475 typedef enum
1476 {
1481 
1482 /* ----------------
1483  * ParallelBitmapHeapState information
1484  * tbmiterator iterator for scanning current pages
1485  * prefetch_iterator iterator for prefetching ahead of current page
1486  * mutex mutual exclusion for the prefetching variable
1487  * and state
1488  * prefetch_pages # pages prefetch iterator is ahead of current
1489  * prefetch_target current target prefetch distance
1490  * state current state of the TIDBitmap
1491  * cv conditional wait variable
1492  * phs_snapshot_data snapshot data shared to workers
1493  * ----------------
1494  */
1496 {
1504  char phs_snapshot_data[FLEXIBLE_ARRAY_MEMBER];
1506 
1507 /* ----------------
1508  * BitmapHeapScanState information
1509  *
1510  * bitmapqualorig execution state for bitmapqualorig expressions
1511  * tbm bitmap obtained from child index scan(s)
1512  * tbmiterator iterator for scanning current pages
1513  * tbmres current-page data
1514  * can_skip_fetch can we potentially skip tuple fetches in this scan?
1515  * return_empty_tuples number of empty tuples to return
1516  * vmbuffer buffer for visibility-map lookups
1517  * pvmbuffer ditto, for prefetched pages
1518  * exact_pages total number of exact pages retrieved
1519  * lossy_pages total number of lossy pages retrieved
1520  * prefetch_iterator iterator for prefetching ahead of current page
1521  * prefetch_pages # pages prefetch iterator is ahead of current
1522  * prefetch_target current target prefetch distance
1523  * prefetch_maximum maximum value for prefetch_target
1524  * pscan_len size of the shared memory for parallel bitmap
1525  * initialized is node is ready to iterate
1526  * shared_tbmiterator shared iterator
1527  * shared_prefetch_iterator shared iterator for prefetching
1528  * pstate shared state for parallel bitmap scan
1529  * ----------------
1530  */
1531 typedef struct BitmapHeapScanState
1532 {
1533  ScanState ss; /* its first field is NodeTag */
1554 
1555 /* ----------------
1556  * TidScanState information
1557  *
1558  * tidexprs list of TidExpr structs (see nodeTidscan.c)
1559  * isCurrentOf scan has a CurrentOfExpr qual
1560  * NumTids number of tids in this scan
1561  * TidPtr index of currently fetched tid
1562  * TidList evaluated item pointers (array of size NumTids)
1563  * htup currently-fetched tuple, if any
1564  * ----------------
1565  */
1566 typedef struct TidScanState
1567 {
1568  ScanState ss; /* its first field is NodeTag */
1575 } TidScanState;
1576 
1577 /* ----------------
1578  * SubqueryScanState information
1579  *
1580  * SubqueryScanState is used for scanning a sub-query in the range table.
1581  * ScanTupleSlot references the current output tuple of the sub-query.
1582  * ----------------
1583  */
1584 typedef struct SubqueryScanState
1585 {
1586  ScanState ss; /* its first field is NodeTag */
1589 
1590 /* ----------------
1591  * FunctionScanState information
1592  *
1593  * Function nodes are used to scan the results of a
1594  * function appearing in FROM (typically a function returning set).
1595  *
1596  * eflags node's capability flags
1597  * ordinality is this scan WITH ORDINALITY?
1598  * simple true if we have 1 function and no ordinality
1599  * ordinal current ordinal column value
1600  * nfuncs number of functions being executed
1601  * funcstates per-function execution states (private in
1602  * nodeFunctionscan.c)
1603  * argcontext memory context to evaluate function arguments in
1604  * ----------------
1605  */
1607 
1608 typedef struct FunctionScanState
1609 {
1610  ScanState ss; /* its first field is NodeTag */
1611  int eflags;
1613  bool simple;
1614  int64 ordinal;
1615  int nfuncs;
1616  struct FunctionScanPerFuncState *funcstates; /* array of length nfuncs */
1619 
1620 /* ----------------
1621  * ValuesScanState information
1622  *
1623  * ValuesScan nodes are used to scan the results of a VALUES list
1624  *
1625  * rowcontext per-expression-list context
1626  * exprlists array of expression lists being evaluated
1627  * array_len size of array
1628  * curr_idx current array index (0-based)
1629  *
1630  * Note: ss.ps.ps_ExprContext is used to evaluate any qual or projection
1631  * expressions attached to the node. We create a second ExprContext,
1632  * rowcontext, in which to build the executor expression state for each
1633  * Values sublist. Resetting this context lets us get rid of expression
1634  * state for each row, avoiding major memory leakage over a long values list.
1635  * ----------------
1636  */
1637 typedef struct ValuesScanState
1638 {
1639  ScanState ss; /* its first field is NodeTag */
1644 } ValuesScanState;
1645 
1646 /* ----------------
1647  * TableFuncScanState node
1648  *
1649  * Used in table-expression functions like XMLTABLE.
1650  * ----------------
1651  */
1652 typedef struct TableFuncScanState
1653 {
1654  ScanState ss; /* its first field is NodeTag */
1655  ExprState *docexpr; /* state for document expression */
1656  ExprState *rowexpr; /* state for row-generating expression */
1657  List *colexprs; /* state for column-generating expression */
1658  List *coldefexprs; /* state for column default expressions */
1659  List *ns_names; /* same as TableFunc.ns_names */
1660  List *ns_uris; /* list of states of namespace URI exprs */
1661  Bitmapset *notnulls; /* nullability flag for each output column */
1662  void *opaque; /* table builder private space */
1663  const struct TableFuncRoutine *routine; /* table builder methods */
1664  FmgrInfo *in_functions; /* input function for each column */
1665  Oid *typioparams; /* typioparam for each column */
1666  int64 ordinal; /* row number to be output next */
1667  MemoryContext perTableCxt; /* per-table context */
1668  Tuplestorestate *tupstore; /* output tuple store */
1670 
1671 /* ----------------
1672  * CteScanState information
1673  *
1674  * CteScan nodes are used to scan a CommonTableExpr query.
1675  *
1676  * Multiple CteScan nodes can read out from the same CTE query. We use
1677  * a tuplestore to hold rows that have been read from the CTE query but
1678  * not yet consumed by all readers.
1679  * ----------------
1680  */
1681 typedef struct CteScanState
1682 {
1683  ScanState ss; /* its first field is NodeTag */
1684  int eflags; /* capability flags to pass to tuplestore */
1685  int readptr; /* index of my tuplestore read pointer */
1686  PlanState *cteplanstate; /* PlanState for the CTE query itself */
1687  /* Link to the "leader" CteScanState (possibly this same node) */
1689  /* The remaining fields are only valid in the "leader" CteScanState */
1690  Tuplestorestate *cte_table; /* rows already read from the CTE query */
1691  bool eof_cte; /* reached end of CTE query? */
1692 } CteScanState;
1693 
1694 /* ----------------
1695  * NamedTuplestoreScanState information
1696  *
1697  * NamedTuplestoreScan nodes are used to scan a Tuplestore created and
1698  * named prior to execution of the query. An example is a transition
1699  * table for an AFTER trigger.
1700  *
1701  * Multiple NamedTuplestoreScan nodes can read out from the same Tuplestore.
1702  * ----------------
1703  */
1705 {
1706  ScanState ss; /* its first field is NodeTag */
1707  int readptr; /* index of my tuplestore read pointer */
1708  TupleDesc tupdesc; /* format of the tuples in the tuplestore */
1709  Tuplestorestate *relation; /* the rows */
1711 
1712 /* ----------------
1713  * WorkTableScanState information
1714  *
1715  * WorkTableScan nodes are used to scan the work table created by
1716  * a RecursiveUnion node. We locate the RecursiveUnion node
1717  * during executor startup.
1718  * ----------------
1719  */
1720 typedef struct WorkTableScanState
1721 {
1722  ScanState ss; /* its first field is NodeTag */
1725 
1726 /* ----------------
1727  * ForeignScanState information
1728  *
1729  * ForeignScan nodes are used to scan foreign-data tables.
1730  * ----------------
1731  */
1732 typedef struct ForeignScanState
1733 {
1734  ScanState ss; /* its first field is NodeTag */
1735  ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */
1736  Size pscan_len; /* size of parallel coordination information */
1737  /* use struct pointer to avoid including fdwapi.h here */
1739  void *fdw_state; /* foreign-data wrapper can keep state here */
1741 
1742 /* ----------------
1743  * CustomScanState information
1744  *
1745  * CustomScan nodes are used to execute custom code within executor.
1746  *
1747  * Core code must avoid assuming that the CustomScanState is only as large as
1748  * the structure declared here; providers are allowed to make it the first
1749  * element in a larger structure, and typically would need to do so. The
1750  * struct is actually allocated by the CreateCustomScanState method associated
1751  * with the plan node. Any additional fields can be initialized there, or in
1752  * the BeginCustomScan method.
1753  * ----------------
1754  */
1755 struct CustomExecMethods;
1756 
1757 typedef struct CustomScanState
1758 {
1760  uint32 flags; /* mask of CUSTOMPATH_* flags, see
1761  * nodes/extensible.h */
1762  List *custom_ps; /* list of child PlanState nodes, if any */
1763  Size pscan_len; /* size of parallel coordination information */
1765 } CustomScanState;
1766 
1767 /* ----------------------------------------------------------------
1768  * Join State Information
1769  * ----------------------------------------------------------------
1770  */
1771 
1772 /* ----------------
1773  * JoinState information
1774  *
1775  * Superclass for state nodes of join plans.
1776  * ----------------
1777  */
1778 typedef struct JoinState
1779 {
1782  bool single_match; /* True if we should skip to next outer tuple
1783  * after finding one inner match */
1784  ExprState *joinqual; /* JOIN quals (in addition to ps.qual) */
1785 } JoinState;
1786 
1787 /* ----------------
1788  * NestLoopState information
1789  *
1790  * NeedNewOuter true if need new outer tuple on next call
1791  * MatchedOuter true if found a join match for current outer tuple
1792  * NullInnerTupleSlot prepared null tuple for left outer joins
1793  * ----------------
1794  */
1795 typedef struct NestLoopState
1796 {
1797  JoinState js; /* its first field is NodeTag */
1801 } NestLoopState;
1802 
1803 /* ----------------
1804  * MergeJoinState information
1805  *
1806  * NumClauses number of mergejoinable join clauses
1807  * Clauses info for each mergejoinable clause
1808  * JoinState current state of ExecMergeJoin state machine
1809  * SkipMarkRestore true if we may skip Mark and Restore operations
1810  * ExtraMarks true to issue extra Mark operations on inner scan
1811  * ConstFalseJoin true if we have a constant-false joinqual
1812  * FillOuter true if should emit unjoined outer tuples anyway
1813  * FillInner true if should emit unjoined inner tuples anyway
1814  * MatchedOuter true if found a join match for current outer tuple
1815  * MatchedInner true if found a join match for current inner tuple
1816  * OuterTupleSlot slot in tuple table for cur outer tuple
1817  * InnerTupleSlot slot in tuple table for cur inner tuple
1818  * MarkedTupleSlot slot in tuple table for marked tuple
1819  * NullOuterTupleSlot prepared null tuple for right outer joins
1820  * NullInnerTupleSlot prepared null tuple for left outer joins
1821  * OuterEContext workspace for computing outer tuple's join values
1822  * InnerEContext workspace for computing inner tuple's join values
1823  * ----------------
1824  */
1825 /* private in nodeMergejoin.c: */
1827 
1828 typedef struct MergeJoinState
1829 {
1830  JoinState js; /* its first field is NodeTag */
1832  MergeJoinClause mj_Clauses; /* array of length mj_NumClauses */
1848 } MergeJoinState;
1849 
1850 /* ----------------
1851  * HashJoinState information
1852  *
1853  * hashclauses original form of the hashjoin condition
1854  * hj_OuterHashKeys the outer hash keys in the hashjoin condition
1855  * hj_HashOperators the join operators in the hashjoin condition
1856  * hj_HashTable hash table for the hashjoin
1857  * (NULL if table not built yet)
1858  * hj_CurHashValue hash value for current outer tuple
1859  * hj_CurBucketNo regular bucket# for current outer tuple
1860  * hj_CurSkewBucketNo skew bucket# for current outer tuple
1861  * hj_CurTuple last inner tuple matched to current outer
1862  * tuple, or NULL if starting search
1863  * (hj_CurXXX variables are undefined if
1864  * OuterTupleSlot is empty!)
1865  * hj_OuterTupleSlot tuple slot for outer tuples
1866  * hj_HashTupleSlot tuple slot for inner (hashed) tuples
1867  * hj_NullOuterTupleSlot prepared null tuple for right/full outer joins
1868  * hj_NullInnerTupleSlot prepared null tuple for left/full outer joins
1869  * hj_FirstOuterTupleSlot first tuple retrieved from outer plan
1870  * hj_JoinState current state of ExecHashJoin state machine
1871  * hj_MatchedOuter true if found a join match for current outer
1872  * hj_OuterNotEmpty true if outer relation known not empty
1873  * ----------------
1874  */
1875 
1876 /* these structs are defined in executor/hashjoin.h: */
1879 
1880 typedef struct HashJoinState
1881 {
1882  JoinState js; /* its first field is NodeTag */
1884  List *hj_OuterHashKeys; /* list of ExprState nodes */
1885  List *hj_HashOperators; /* list of operator OIDs */
1887  HashJoinTable hj_HashTable;
1891  HashJoinTuple hj_CurTuple;
1900 } HashJoinState;
1901 
1902 
1903 /* ----------------------------------------------------------------
1904  * Materialization State Information
1905  * ----------------------------------------------------------------
1906  */
1907 
1908 /* ----------------
1909  * MaterialState information
1910  *
1911  * materialize nodes are used to materialize the results
1912  * of a subplan into a temporary file.
1913  *
1914  * ss.ss_ScanTupleSlot refers to output of underlying plan.
1915  * ----------------
1916  */
1917 typedef struct MaterialState
1918 {
1919  ScanState ss; /* its first field is NodeTag */
1920  int eflags; /* capability flags to pass to tuplestore */
1921  bool eof_underlying; /* reached end of underlying plan? */
1923 } MaterialState;
1924 
1925 /* ----------------
1926  * Shared memory container for per-worker sort information
1927  * ----------------
1928  */
1929 typedef struct SharedSortInfo
1930 {
1932  TuplesortInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER];
1933 } SharedSortInfo;
1934 
1935 /* ----------------
1936  * SortState information
1937  * ----------------
1938  */
1939 typedef struct SortState
1940 {
1941  ScanState ss; /* its first field is NodeTag */
1942  bool randomAccess; /* need random access to sort output? */
1943  bool bounded; /* is the result set bounded? */
1944  int64 bound; /* if bounded, how many tuples are needed */
1945  bool sort_Done; /* sort completed yet? */
1946  bool bounded_Done; /* value of bounded we did the sort with */
1947  int64 bound_Done; /* value of bound we did the sort with */
1948  void *tuplesortstate; /* private state of tuplesort.c */
1949  bool am_worker; /* are we a worker? */
1950  SharedSortInfo *shared_info; /* one entry per worker */
1951 } SortState;
1952 
1953 /* ---------------------
1954  * GroupState information
1955  * ---------------------
1956  */
1957 typedef struct GroupState
1958 {
1959  ScanState ss; /* its first field is NodeTag */
1960  ExprState *eqfunction; /* equality function */
1961  bool grp_done; /* indicates completion of Group scan */
1962 } GroupState;
1963 
1964 /* ---------------------
1965  * AggState information
1966  *
1967  * ss.ss_ScanTupleSlot refers to output of underlying plan.
1968  *
1969  * Note: ss.ps.ps_ExprContext contains ecxt_aggvalues and
1970  * ecxt_aggnulls arrays, which hold the computed agg values for the current
1971  * input group during evaluation of an Agg node's output tuple(s). We
1972  * create a second ExprContext, tmpcontext, in which to evaluate input
1973  * expressions and run the aggregate transition functions.
1974  * ---------------------
1975  */
1976 /* these structs are private in nodeAgg.c: */
1982 
1983 typedef struct AggState
1984 {
1985  ScanState ss; /* its first field is NodeTag */
1986  List *aggs; /* all Aggref nodes in targetlist & quals */
1987  int numaggs; /* length of list (could be zero!) */
1988  int numtrans; /* number of pertrans items */
1989  AggStrategy aggstrategy; /* strategy mode */
1990  AggSplit aggsplit; /* agg-splitting mode, see nodes.h */
1991  AggStatePerPhase phase; /* pointer to current phase data */
1992  int numphases; /* number of phases (including phase 0) */
1993  int current_phase; /* current phase number */
1994  AggStatePerAgg peragg; /* per-Aggref information */
1995  AggStatePerTrans pertrans; /* per-Trans state information */
1996  ExprContext *hashcontext; /* econtexts for long-lived data (hashtable) */
1997  ExprContext **aggcontexts; /* econtexts for long-lived data (per GS) */
1998  ExprContext *tmpcontext; /* econtext for input expressions */
1999 #define FIELDNO_AGGSTATE_CURAGGCONTEXT 14
2000  ExprContext *curaggcontext; /* currently active aggcontext */
2001  AggStatePerAgg curperagg; /* currently active aggregate, if any */
2002 #define FIELDNO_AGGSTATE_CURPERTRANS 16
2003  AggStatePerTrans curpertrans; /* currently active trans state, if any */
2004  bool input_done; /* indicates end of input */
2005  bool agg_done; /* indicates completion of Agg scan */
2006  int projected_set; /* The last projected grouping set */
2007 #define FIELDNO_AGGSTATE_CURRENT_SET 20
2008  int current_set; /* The current grouping set being evaluated */
2009  Bitmapset *grouped_cols; /* grouped cols in current projection */
2010  List *all_grouped_cols; /* list of all grouped cols in DESC order */
2011  /* These fields are for grouping set phase data */
2012  int maxsets; /* The max number of sets in any phase */
2013  AggStatePerPhase phases; /* array of all phases */
2014  Tuplesortstate *sort_in; /* sorted input to phases > 1 */
2015  Tuplesortstate *sort_out; /* input is copied here for next phase */
2016  TupleTableSlot *sort_slot; /* slot for sort results */
2017  /* these fields are used in AGG_PLAIN and AGG_SORTED modes: */
2018  AggStatePerGroup *pergroups; /* grouping set indexed array of per-group
2019  * pointers */
2020  HeapTuple grp_firstTuple; /* copy of first tuple of current group */
2021  /* these fields are used in AGG_HASHED and AGG_MIXED modes: */
2022  bool table_filled; /* hash table filled yet? */
2024  AggStatePerHash perhash; /* array of per-hashtable data */
2025  AggStatePerGroup *hash_pergroup; /* grouping set indexed array of
2026  * per-group pointers */
2027 
2028  /* support for evaluation of agg input expressions: */
2029 #define FIELDNO_AGGSTATE_ALL_PERGROUPS 34
2030  AggStatePerGroup *all_pergroups; /* array of first ->pergroups, than
2031  * ->hash_pergroup */
2032  ProjectionInfo *combinedproj; /* projection machinery */
2033 } AggState;
2034 
2035 /* ----------------
2036  * WindowAggState information
2037  * ----------------
2038  */
2039 /* these structs are private in nodeWindowAgg.c: */
2042 
2043 typedef struct WindowAggState
2044 {
2045  ScanState ss; /* its first field is NodeTag */
2046 
2047  /* these fields are filled in by ExecInitExpr: */
2048  List *funcs; /* all WindowFunc nodes in targetlist */
2049  int numfuncs; /* total number of window functions */
2050  int numaggs; /* number that are plain aggregates */
2051 
2052  WindowStatePerFunc perfunc; /* per-window-function information */
2053  WindowStatePerAgg peragg; /* per-plain-aggregate information */
2054  ExprState *partEqfunction; /* equality funcs for partition columns */
2055  ExprState *ordEqfunction; /* equality funcs for ordering columns */
2056  Tuplestorestate *buffer; /* stores rows of current partition */
2057  int current_ptr; /* read pointer # for current row */
2058  int framehead_ptr; /* read pointer # for frame head, if used */
2059  int frametail_ptr; /* read pointer # for frame tail, if used */
2060  int grouptail_ptr; /* read pointer # for group tail, if used */
2061  int64 spooled_rows; /* total # of rows in buffer */
2062  int64 currentpos; /* position of current row in partition */
2063  int64 frameheadpos; /* current frame head position */
2064  int64 frametailpos; /* current frame tail position (frame end+1) */
2065  /* use struct pointer to avoid including windowapi.h here */
2066  struct WindowObjectData *agg_winobj; /* winobj for aggregate fetches */
2067  int64 aggregatedbase; /* start row for current aggregates */
2068  int64 aggregatedupto; /* rows before this one are aggregated */
2069 
2070  int frameOptions; /* frame_clause options, see WindowDef */
2071  ExprState *startOffset; /* expression for starting bound offset */
2072  ExprState *endOffset; /* expression for ending bound offset */
2073  Datum startOffsetValue; /* result of startOffset evaluation */
2074  Datum endOffsetValue; /* result of endOffset evaluation */
2075 
2076  /* these fields are used with RANGE offset PRECEDING/FOLLOWING: */
2077  FmgrInfo startInRangeFunc; /* in_range function for startOffset */
2078  FmgrInfo endInRangeFunc; /* in_range function for endOffset */
2079  Oid inRangeColl; /* collation for in_range tests */
2080  bool inRangeAsc; /* use ASC sort order for in_range tests? */
2081  bool inRangeNullsFirst; /* nulls sort first for in_range tests? */
2082 
2083  /* these fields are used in GROUPS mode: */
2084  int64 currentgroup; /* peer group # of current row in partition */
2085  int64 frameheadgroup; /* peer group # of frame head row */
2086  int64 frametailgroup; /* peer group # of frame tail row */
2087  int64 groupheadpos; /* current row's peer group head position */
2088  int64 grouptailpos; /* " " " " tail position (group end+1) */
2089 
2090  MemoryContext partcontext; /* context for partition-lifespan data */
2091  MemoryContext aggcontext; /* shared context for aggregate working data */
2092  MemoryContext curaggcontext; /* current aggregate's working data */
2093  ExprContext *tmpcontext; /* short-term evaluation context */
2094 
2095  bool all_first; /* true if the scan is starting */
2096  bool all_done; /* true if the scan is finished */
2097  bool partition_spooled; /* true if all tuples in current partition
2098  * have been spooled into tuplestore */
2099  bool more_partitions; /* true if there's more partitions after
2100  * this one */
2101  bool framehead_valid; /* true if frameheadpos is known up to
2102  * date for current row */
2103  bool frametail_valid; /* true if frametailpos is known up to
2104  * date for current row */
2105  bool grouptail_valid; /* true if grouptailpos is known up to
2106  * date for current row */
2107 
2108  TupleTableSlot *first_part_slot; /* first tuple of current or next
2109  * partition */
2110  TupleTableSlot *framehead_slot; /* first tuple of current frame */
2111  TupleTableSlot *frametail_slot; /* first tuple after current frame */
2112 
2113  /* temporary slots for tuples fetched back from tuplestore */
2117 } WindowAggState;
2118 
2119 /* ----------------
2120  * UniqueState information
2121  *
2122  * Unique nodes are used "on top of" sort nodes to discard
2123  * duplicate tuples returned from the sort phase. Basically
2124  * all it does is compare the current tuple from the subplan
2125  * with the previously fetched tuple (stored in its result slot).
2126  * If the two are identical in all interesting fields, then
2127  * we just fetch another tuple from the sort and try again.
2128  * ----------------
2129  */
2130 typedef struct UniqueState
2131 {
2132  PlanState ps; /* its first field is NodeTag */
2133  ExprState *eqfunction; /* tuple equality qual */
2134 } UniqueState;
2135 
2136 /* ----------------
2137  * GatherState information
2138  *
2139  * Gather nodes launch 1 or more parallel workers, run a subplan
2140  * in those workers, and collect the results.
2141  * ----------------
2142  */
2143 typedef struct GatherState
2144 {
2145  PlanState ps; /* its first field is NodeTag */
2146  bool initialized; /* workers launched? */
2147  bool need_to_scan_locally; /* need to read from local plan? */
2148  int64 tuples_needed; /* tuple bound, see ExecSetTupleBound */
2149  /* these fields are set up once: */
2152  /* all remaining fields are reinitialized during a rescan: */
2153  int nworkers_launched; /* original number of workers */
2154  int nreaders; /* number of still-active workers */
2155  int nextreader; /* next one to try to read from */
2156  struct TupleQueueReader **reader; /* array with nreaders active entries */
2157 } GatherState;
2158 
2159 /* ----------------
2160  * GatherMergeState information
2161  *
2162  * Gather merge nodes launch 1 or more parallel workers, run a
2163  * subplan which produces sorted output in each worker, and then
2164  * merge the results into a single sorted stream.
2165  * ----------------
2166  */
2167 struct GMReaderTupleBuffer; /* private in nodeGatherMerge.c */
2168 
2169 typedef struct GatherMergeState
2170 {
2171  PlanState ps; /* its first field is NodeTag */
2172  bool initialized; /* workers launched? */
2173  bool gm_initialized; /* gather_merge_init() done? */
2174  bool need_to_scan_locally; /* need to read from local plan? */
2175  int64 tuples_needed; /* tuple bound, see ExecSetTupleBound */
2176  /* these fields are set up once: */
2177  TupleDesc tupDesc; /* descriptor for subplan result tuples */
2178  int gm_nkeys; /* number of sort columns */
2179  SortSupport gm_sortkeys; /* array of length gm_nkeys */
2181  /* all remaining fields are reinitialized during a rescan */
2182  /* (but the arrays are not reallocated, just cleared) */
2183  int nworkers_launched; /* original number of workers */
2184  int nreaders; /* number of active workers */
2185  TupleTableSlot **gm_slots; /* array with nreaders+1 entries */
2186  struct TupleQueueReader **reader; /* array with nreaders active entries */
2187  struct GMReaderTupleBuffer *gm_tuple_buffers; /* nreaders tuple buffers */
2188  struct binaryheap *gm_heap; /* binary heap of slot indices */
2190 
2191 /* ----------------
2192  * Values displayed by EXPLAIN ANALYZE
2193  * ----------------
2194  */
2195 typedef struct HashInstrumentation
2196 {
2197  int nbuckets; /* number of buckets at end of execution */
2198  int nbuckets_original; /* planned number of buckets */
2199  int nbatch; /* number of batches at end of execution */
2200  int nbatch_original; /* planned number of batches */
2201  size_t space_peak; /* speak memory usage in bytes */
2203 
2204 /* ----------------
2205  * Shared memory container for per-worker hash information
2206  * ----------------
2207  */
2208 typedef struct SharedHashInfo
2209 {
2211  HashInstrumentation hinstrument[FLEXIBLE_ARRAY_MEMBER];
2212 } SharedHashInfo;
2213 
2214 /* ----------------
2215  * HashState information
2216  * ----------------
2217  */
2218 typedef struct HashState
2219 {
2220  PlanState ps; /* its first field is NodeTag */
2221  HashJoinTable hashtable; /* hash table for the hashjoin */
2222  List *hashkeys; /* list of ExprState nodes */
2223 
2224  SharedHashInfo *shared_info; /* one entry per worker */
2225  HashInstrumentation *hinstrument; /* this worker's entry */
2226 
2227  /* Parallel hash state. */
2229 } HashState;
2230 
2231 /* ----------------
2232  * SetOpState information
2233  *
2234  * Even in "sorted" mode, SetOp nodes are more complex than a simple
2235  * Unique, since we have to count how many duplicates to return. But
2236  * we also support hashing, so this is really more like a cut-down
2237  * form of Agg.
2238  * ----------------
2239  */
2240 /* this struct is private in nodeSetOp.c: */
2242 
2243 typedef struct SetOpState
2244 {
2245  PlanState ps; /* its first field is NodeTag */
2246  ExprState *eqfunction; /* equality comparator */
2247  Oid *eqfuncoids; /* per-grouping-field equality fns */
2248  FmgrInfo *hashfunctions; /* per-grouping-field hash fns */
2249  bool setop_done; /* indicates completion of output scan */
2250  long numOutput; /* number of dups left to output */
2251  /* these fields are used in SETOP_SORTED mode: */
2252  SetOpStatePerGroup pergroup; /* per-group working state */
2253  HeapTuple grp_firstTuple; /* copy of first tuple of current group */
2254  /* these fields are used in SETOP_HASHED mode: */
2255  TupleHashTable hashtable; /* hash table with one entry per group */
2256  MemoryContext tableContext; /* memory context containing hash table */
2257  bool table_filled; /* hash table filled yet? */
2258  TupleHashIterator hashiter; /* for iterating through hash table */
2259 } SetOpState;
2260 
2261 /* ----------------
2262  * LockRowsState information
2263  *
2264  * LockRows nodes are used to enforce FOR [KEY] UPDATE/SHARE locking.
2265  * ----------------
2266  */
2267 typedef struct LockRowsState
2268 {
2269  PlanState ps; /* its first field is NodeTag */
2270  List *lr_arowMarks; /* List of ExecAuxRowMarks */
2271  EPQState lr_epqstate; /* for evaluating EvalPlanQual rechecks */
2272 } LockRowsState;
2273 
2274 /* ----------------
2275  * LimitState information
2276  *
2277  * Limit nodes are used to enforce LIMIT/OFFSET clauses.
2278  * They just select the desired subrange of their subplan's output.
2279  *
2280  * offset is the number of initial tuples to skip (0 does nothing).
2281  * count is the number of tuples to return after skipping the offset tuples.
2282  * If no limit count was specified, count is undefined and noCount is true.
2283  * When lstate == LIMIT_INITIAL, offset/count/noCount haven't been set yet.
2284  * ----------------
2285  */
2286 typedef enum
2287 {
2288  LIMIT_INITIAL, /* initial state for LIMIT node */
2289  LIMIT_RESCAN, /* rescan after recomputing parameters */
2290  LIMIT_EMPTY, /* there are no returnable rows */
2291  LIMIT_INWINDOW, /* have returned a row in the window */
2292  LIMIT_SUBPLANEOF, /* at EOF of subplan (within window) */
2293  LIMIT_WINDOWEND, /* stepped off end of window */
2294  LIMIT_WINDOWSTART /* stepped off beginning of window */
2295 } LimitStateCond;
2296 
2297 typedef struct LimitState
2298 {
2299  PlanState ps; /* its first field is NodeTag */
2300  ExprState *limitOffset; /* OFFSET parameter, or NULL if none */
2301  ExprState *limitCount; /* COUNT parameter, or NULL if none */
2302  int64 offset; /* current OFFSET value */
2303  int64 count; /* current COUNT, if any */
2304  bool noCount; /* if true, ignore count */
2305  LimitStateCond lstate; /* state machine status, as above */
2306  int64 position; /* 1-based index of last tuple returned */
2307  TupleTableSlot *subSlot; /* tuple last obtained from subplan */
2308 } LimitState;
2309 
2310 #endif /* EXECNODES_H */
bool ioss_RuntimeKeysReady
Definition: execnodes.h:1421
Datum * elem_values
Definition: execnodes.h:1335
JoinType jointype
Definition: execnodes.h:1781
ExprContext * exprcontext
Definition: execnodes.h:713
signed short int16
Definition: c.h:345
struct AggStatePerTransData * AggStatePerTrans
Definition: execnodes.h:1978
FmgrInfo func
Definition: execnodes.h:797
AttrNumber jf_junkAttNo
Definition: execnodes.h:371
int ri_NumIndices
Definition: execnodes.h:414
int slock_t
Definition: s_lock.h:929
struct ParallelHashJoinState * parallel_state
Definition: execnodes.h:2228
AggStatePerGroup * hash_pergroup
Definition: execnodes.h:2025
struct ScanKeyData * scan_key
Definition: execnodes.h:1324
Size pstate_len
Definition: execnodes.h:1173
struct GroupState GroupState
uint32 CommandId
Definition: c.h:521
Node tag
Definition: execnodes.h:64
ScanState ss
Definition: execnodes.h:1734
IndexRuntimeKeyInfo * biss_RuntimeKeys
Definition: execnodes.h:1452
struct TupleHashTableData TupleHashTableData
struct AggStatePerGroupData * AggStatePerGroup
Definition: execnodes.h:1979
struct IndexScanDescData * biss_ScanDesc
Definition: execnodes.h:1459
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:2092
struct TransitionCaptureState * mt_oc_transition_capture
Definition: execnodes.h:1139
JunkFilter * es_junkFilter
Definition: execnodes.h:514
struct dsa_area * es_query_dsa
Definition: execnodes.h:589
uint16 * ii_UniqueStrats
Definition: execnodes.h:169
NodeTag type
Definition: execnodes.h:943
bool rs_done
Definition: execnodes.h:1082
Relation ri_RelationDesc
Definition: execnodes.h:411
ExprState * endOffset
Definition: execnodes.h:2072
AggStatePerPhase phases
Definition: execnodes.h:2013
struct WindowFuncExprState WindowFuncExprState
struct GMReaderTupleBuffer * gm_tuple_buffers
Definition: execnodes.h:2187
TupleTableSlot * ioss_TableSlot
Definition: execnodes.h:1425
ProjectionInfo * projLeft
Definition: execnodes.h:861
int nworkers_launched
Definition: execnodes.h:2153
HeapTuple curTuple
Definition: execnodes.h:857
bool nl_MatchedOuter
Definition: execnodes.h:1799
Datum * ecxt_aggvalues
Definition: execnodes.h:243
const TupleTableSlotOps * innerops
Definition: execnodes.h:1019
WorkerInstrumentation * worker_instrument
Definition: execnodes.h:956
struct WindowStatePerAggData * WindowStatePerAgg
Definition: execnodes.h:2041
TupleHashTable hashtable
Definition: execnodes.h:863
struct PlanState * parent
Definition: execnodes.h:108
ExprState * bitmapqualorig
Definition: execnodes.h:1534
MemoryContext tableContext
Definition: execnodes.h:2256
MemoryContext argcontext
Definition: execnodes.h:1100
NodeTag type
Definition: execnodes.h:329
TupleTableSlot * hj_NullInnerTupleSlot
Definition: execnodes.h:1895
Datum startOffsetValue
Definition: execnodes.h:2073
TupleTableSlot ** ms_slots
Definition: execnodes.h:1203
ExprState * aggfilter
Definition: execnodes.h:765
ExprContext * innerecontext
Definition: execnodes.h:869
ExprState * joinqual
Definition: execnodes.h:1784
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:1095
Tuplestorestate * tuplestorestate
Definition: execnodes.h:1922
ProjectionInfo * ps_ProjInfo
Definition: execnodes.h:985
SortSupport ms_sortkeys
Definition: execnodes.h:1202
Instrumentation * instrument
Definition: execnodes.h:955
struct SetOpStatePerGroupData * SetOpStatePerGroup
Definition: execnodes.h:2241
PlanState ps
Definition: execnodes.h:1254
NodeTag type
Definition: execnodes.h:220
ExprContext * mj_InnerEContext
Definition: execnodes.h:1847
bool bounded_Done
Definition: execnodes.h:1946
ExprState * eqfunction
Definition: execnodes.h:2246
Tuplestorestate * intermediate_table
Definition: execnodes.h:1228
struct JitContext * es_jit
Definition: execnodes.h:601
EPQState lr_epqstate
Definition: execnodes.h:2271
bool mj_ConstFalseJoin
Definition: execnodes.h:1836
struct PartitionPruneState * as_prune_state
Definition: execnodes.h:1174
struct PartitionTupleRouting * mt_partition_tuple_routing
Definition: execnodes.h:1133
struct ScanKeyData * scan_key
Definition: execnodes.h:1331
int numaggs
Definition: execnodes.h:1987
bool noCount
Definition: execnodes.h:2304
DomainConstraintType constrainttype
Definition: execnodes.h:909
Oid * eqfuncoids
Definition: execnodes.h:2247
bool agg_done
Definition: execnodes.h:2005
PlanState ps
Definition: execnodes.h:1780
struct WindowAggState WindowAggState
ScanState ss
Definition: execnodes.h:2045
bool nl_NeedNewOuter
Definition: execnodes.h:1798
struct SetExprState SetExprState
TupleTableSlot * inputslot
Definition: execnodes.h:709
Relation relation
Definition: execnodes.h:627
IndexRuntimeKeyInfo * iss_RuntimeKeys
Definition: execnodes.h:1374
int64 groupheadpos
Definition: execnodes.h:2087
bool bounded
Definition: execnodes.h:1943
NodeTag type
Definition: execnodes.h:299
TupleTableSlot * sort_slot
Definition: execnodes.h:2016
List * initPlan
Definition: execnodes.h:970
List * all_grouped_cols
Definition: execnodes.h:2010
ResultRelInfo * resultRelInfo
Definition: execnodes.h:1118
Tuplesortstate * sort_out
Definition: execnodes.h:2015
struct ExprEvalStep * steps
Definition: execnodes.h:86
bool shutdown_reg
Definition: execnodes.h:835
ScanState ss
Definition: execnodes.h:1985
int16 * iss_OrderByTypLens
Definition: execnodes.h:1388
bool * innermost_casenull
Definition: execnodes.h:112
FmgrInfo * hashfunctions
Definition: execnodes.h:1231
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:984
MinimalTuple firstTuple
Definition: execnodes.h:682
SortSupport iss_SortSupport
Definition: execnodes.h:1386
bool inneropsset
Definition: execnodes.h:1027
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:232
LimitStateCond
Definition: execnodes.h:2286
struct JitInstrumentation * es_jit_worker_instr
Definition: execnodes.h:602
ExprState * ri_PartitionCheckExpr
Definition: execnodes.h:479
struct BitmapHeapScanState BitmapHeapScanState
tuplehash_iterator TupleHashIterator
Definition: execnodes.h:716
TupleTableSlot ** mt_scans
Definition: execnodes.h:1116
bool single_match
Definition: execnodes.h:1782
HashJoinTable hashtable
Definition: execnodes.h:2221
TIDBitmap * tbm
Definition: execnodes.h:1535
int64 bound
Definition: execnodes.h:1944
bool pending_srf_tuples
Definition: execnodes.h:1099
struct TableFuncScanState TableFuncScanState
struct HashInstrumentation HashInstrumentation
Relation biss_RelationDesc
Definition: execnodes.h:1458
List * subPlan
Definition: execnodes.h:972
Definition: jit.h:54
ParamListInfo ext_params
Definition: execnodes.h:109
void * tsm_state
Definition: execnodes.h:1307
TupleTableSlot * mj_MarkedTupleSlot
Definition: execnodes.h:1843
AttrNumber * keyColIdx
Definition: execnodes.h:700
unsigned char uint8
Definition: c.h:356
bool need_to_scan_locally
Definition: execnodes.h:2174
ExprState * tab_eq_func
Definition: execnodes.h:702
Instrumentation * ri_TrigInstrument
Definition: execnodes.h:432
PlannedStmt * es_plannedstmt
Definition: execnodes.h:511
PlanState ps
Definition: execnodes.h:2245
NodeTag type
Definition: execnodes.h:751
int64 currentgroup
Definition: execnodes.h:2084
SharedSortInfo * shared_info
Definition: execnodes.h:1950
int current_phase
Definition: execnodes.h:1993
ScanState ss
Definition: execnodes.h:1919
bool need_to_scan_locally
Definition: execnodes.h:2147
Definition: nodes.h:524
AggSplit aggsplit
Definition: execnodes.h:1990
Snapshot es_crosscheck_snapshot
Definition: execnodes.h:504
struct TableScanDescData * ss_currentScanDesc
Definition: execnodes.h:1282
Oid * ii_ExclusionProcs
Definition: execnodes.h:165
struct CteScanState * leader
Definition: execnodes.h:1688
ScanState ss
Definition: execnodes.h:1683
Bitmapset * ms_valid_subplans
Definition: execnodes.h:1208
int64 aggregatedupto
Definition: execnodes.h:2068
ExprState * cur_eq_func
Definition: execnodes.h:711
List * jf_targetList
Definition: execnodes.h:367
struct ExprState ExprState
TupleTableSlot * mj_NullInnerTupleSlot
Definition: execnodes.h:1845
bool ermActive
Definition: execnodes.h:635
TupleTableSlot * jf_resultSlot
Definition: execnodes.h:370
IndexRuntimeKeyInfo * ioss_RuntimeKeys
Definition: execnodes.h:1419
LockWaitPolicy waitPolicy
Definition: execnodes.h:634
bool hj_MatchedOuter
Definition: execnodes.h:1898
ExprContext * es_per_tuple_exprcontext
Definition: execnodes.h:571
struct NamedTuplestoreScanState NamedTuplestoreScanState
struct SubqueryScanState SubqueryScanState
struct TupleQueueReader ** reader
Definition: execnodes.h:2156
Oid * tab_eq_funcoids
Definition: execnodes.h:871
CmdType operation
Definition: execnodes.h:1110
ScanState ss
Definition: execnodes.h:1292
Snapshot es_snapshot
Definition: execnodes.h:503
ResultRelInfo * rootResultRelInfo
Definition: execnodes.h:1119
bool frametail_valid
Definition: execnodes.h:2103
TupleTableSlot ** gm_slots
Definition: execnodes.h:2185
HeapTuple grp_firstTuple
Definition: execnodes.h:2253
List * args
Definition: execnodes.h:783
TupleTableSlot * ss_ScanTupleSlot
Definition: execnodes.h:1283
bool am_worker
Definition: execnodes.h:1949
struct AggStatePerPhaseData * AggStatePerPhase
Definition: execnodes.h:1980
struct WindowStatePerFuncData * WindowStatePerFunc
Definition: execnodes.h:2040
ExprState * testexpr
Definition: execnodes.h:855
int64 frametailgroup
Definition: execnodes.h:2086
MemoryContext argcontext
Definition: execnodes.h:1617
PlanState ** bitmapplans
Definition: execnodes.h:1244
bool inneropsfixed
Definition: execnodes.h:1023
Datum * innermost_domainval
Definition: execnodes.h:114
int64 grouptailpos
Definition: execnodes.h:2088
LockClauseStrength strength
Definition: execnodes.h:633
DomainConstraintType
Definition: execnodes.h:900
Relation ss_currentRelation
Definition: execnodes.h:1281
AggStatePerTrans pertrans
Definition: execnodes.h:1995
EState * state
Definition: execnodes.h:947
TupleTableSlot * hj_OuterTupleSlot
Definition: execnodes.h:1892
int projected_set
Definition: execnodes.h:2006
List * custom_ps
Definition: execnodes.h:1762
struct OnConflictSetState OnConflictSetState
LimitStateCond lstate
Definition: execnodes.h:2305
TupleTableSlot * resultslot
Definition: execnodes.h:81
List * es_range_table
Definition: execnodes.h:505
ExprState * fdw_recheck_quals
Definition: execnodes.h:1735
struct PlanState * righttree
Definition: execnodes.h:968
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:1884
struct ExecRowMark ExecRowMark
HeapTuple grp_firstTuple
Definition: execnodes.h:2020
TupleTableSlot * ri_TrigNewSlot
Definition: execnodes.h:437
ExprState * limitCount
Definition: execnodes.h:2301
TupleTableSlot * temp_slot_1
Definition: execnodes.h:2115
int current_set
Definition: execnodes.h:2008
WindowStatePerFunc perfunc
Definition: execnodes.h:2052
TupleTableSlot * hj_FirstOuterTupleSlot
Definition: execnodes.h:1896
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:1961
struct ScanKeyData * biss_ScanKeys
Definition: execnodes.h:1450
ExprState * indexqualorig
Definition: execnodes.h:1368
int64 position
Definition: execnodes.h:2306
SharedBitmapState
Definition: execnodes.h:1475
struct IndexScanDescData * ioss_ScanDesc
Definition: execnodes.h:1424
int numtrans
Definition: execnodes.h:1988
Size pscan_len
Definition: execnodes.h:1293
TupleTableSlot *(* ExecProcNodeMtd)(struct PlanState *pstate)
Definition: execnodes.h:932
struct ModifyTableState ModifyTableState
PlanState * planstate
Definition: execnodes.h:1066
ScanDirection es_direction
Definition: execnodes.h:502
List * indexorderbyorig
Definition: execnodes.h:1369
bool * innermost_domainnull
Definition: execnodes.h:115
PlanState ps
Definition: execnodes.h:2171
uint64 dsa_pointer
Definition: dsa.h:62
const TupleTableSlotOps * resultops
Definition: execnodes.h:1020
Index ri_RangeTableIndex
Definition: execnodes.h:408
ExprContext * tmpcontext
Definition: execnodes.h:1998
int64 count
Definition: execnodes.h:2303
PlanState ps
Definition: execnodes.h:1166
JoinType
Definition: nodes.h:691
struct PlanState * lefttree
Definition: execnodes.h:967
HeapTupleData tss_htup
Definition: execnodes.h:1574
struct HashJoinState HashJoinState
TupleTableSlot * first_part_slot
Definition: execnodes.h:2108
FmgrInfo * tab_hash_funcs
Definition: execnodes.h:701
ScanState ss
Definition: execnodes.h:1639
ExecRowMark * rowmark
Definition: execnodes.h:654
ItemPointerData curCtid
Definition: execnodes.h:636
bool es_use_parallel_mode
Definition: execnodes.h:586
SharedHashInfo * shared_info
Definition: execnodes.h:2224
struct ExecRowMark ** es_rowmarks
Definition: execnodes.h:509
const struct CustomExecMethods * methods
Definition: execnodes.h:1764
struct SharedSortInfo SharedSortInfo
List * ri_WithCheckOptionExprs
Definition: execnodes.h:452
FmgrInfo * tab_hash_funcs
Definition: execnodes.h:874
bool * iss_OrderByNulls
Definition: execnodes.h:1385
ScanState ss
Definition: execnodes.h:1959
ExprContext * tmpcontext
Definition: execnodes.h:2093
PlanState ps
Definition: execnodes.h:1280
struct WindowObjectData * agg_winobj
Definition: execnodes.h:2066
TupleTableSlot * oc_Existing
Definition: execnodes.h:383
bool inRangeNullsFirst
Definition: execnodes.h:2081
void * tuplesortstate
Definition: execnodes.h:1948
int64 frameheadpos
Definition: execnodes.h:2063
int maxsets
Definition: execnodes.h:2012
uint32 hj_CurHashValue
Definition: execnodes.h:1888
Tuplestorestate * funcResultStore
Definition: execnodes.h:804
const char * es_sourceText
Definition: execnodes.h:512
TupleDesc expectedDesc
Definition: execnodes.h:302
int hj_CurSkewBucketNo
Definition: execnodes.h:1890
List * ii_ExpressionsState
Definition: execnodes.h:161
struct ProjectSetState ProjectSetState
TupleTableSlot * ps_ResultTupleSlot
Definition: execnodes.h:983
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:878
ExprState * eqfunction
Definition: execnodes.h:2133
struct ParallelExecutorInfo * pei
Definition: execnodes.h:2180
struct FunctionScanState FunctionScanState
bool mj_MatchedOuter
Definition: execnodes.h:1839
PlanState ps
Definition: execnodes.h:1243
bool table_filled
Definition: execnodes.h:2022
AggStrategy aggstrategy
Definition: execnodes.h:1989
ExprState * partEqfunction
Definition: execnodes.h:2054
FmgrInfo * in_hash_funcs
Definition: execnodes.h:710
NodeTag type
Definition: execnodes.h:405
PlanState ps
Definition: execnodes.h:1109
int ii_NumIndexKeyAttrs
Definition: execnodes.h:158
int64 offset
Definition: execnodes.h:2302
bool initialized
Definition: execnodes.h:2146
Bitmapset * notnulls
Definition: execnodes.h:1661
struct PlanState * planstate
Definition: execnodes.h:853
TupleTableSlot * hj_NullOuterTupleSlot
Definition: execnodes.h:1894
bool resnull
Definition: execnodes.h:73
ProjectionInfo * oc_ProjInfo
Definition: execnodes.h:385
ScanState ss
Definition: execnodes.h:1568
ParallelBitmapHeapState * pstate
Definition: execnodes.h:1552
struct CustomScanState CustomScanState
struct ResultRelInfo ResultRelInfo
Expr * expr
Definition: execnodes.h:95
FmgrInfo endInRangeFunc
Definition: execnodes.h:2078
List * args
Definition: execnodes.h:856
SubPlan * subplan
Definition: execnodes.h:852
ExprState * eqfunction
Definition: execnodes.h:1960
ParallelAppendState * as_pstate
Definition: execnodes.h:1172
struct ParallelExecutorInfo * pei
Definition: execnodes.h:2151
Datum caseValue_datum
Definition: execnodes.h:249
PlanState ** bitmapplans
Definition: execnodes.h:1255
ExprContext_CB * ecxt_callbacks
Definition: execnodes.h:263
List * tss_tidexprs
Definition: execnodes.h:1569
NodeTag type
Definition: execnodes.h:366
AlternativeSubPlan * subplan
Definition: execnodes.h:888
struct SeqScanState SeqScanState
bool iss_ReachedEnd
Definition: execnodes.h:1383
struct ScanKeyData * ioss_ScanKeys
Definition: execnodes.h:1415
struct TupleHashEntryData TupleHashEntryData
List * arowMarks
Definition: execnodes.h:1069
struct HashJoinTupleData * HashJoinTuple
Definition: execnodes.h:1877
ExprState * resconstantqual
Definition: execnodes.h:1081
bool mj_MatchedInner
Definition: execnodes.h:1840
bool ri_usesFdwDirectModify
Definition: execnodes.h:446
ScanState ss
Definition: execnodes.h:1759
Tuplesortstate * sort_in
Definition: execnodes.h:2014
AttrNumber * keyColIdx
Definition: execnodes.h:870
MemoryContext tempContext
Definition: execnodes.h:1232
ItemPointerData * tss_TidList
Definition: execnodes.h:1573
NodeTag type
Definition: execnodes.h:781
ExprState ** ri_TrigWhenExprs
Definition: execnodes.h:429
TupleTableSlot * temp_slot_2
Definition: execnodes.h:2116
PlanState ps
Definition: execnodes.h:2269
ExprState * key_expr
Definition: execnodes.h:1325
bool funcReturnsSet
Definition: execnodes.h:818
Aggref * aggref
Definition: execnodes.h:752
struct BitmapAndState BitmapAndState
const TupleTableSlotOps * scanops
Definition: execnodes.h:1017
Datum endOffsetValue
Definition: execnodes.h:2074
Index rti
Definition: execnodes.h:629
WindowStatePerAgg peragg
Definition: execnodes.h:2053
struct TransitionCaptureState * mt_transition_capture
Definition: execnodes.h:1136
ExprContext * ioss_RuntimeContext
Definition: execnodes.h:1422
ExprStateEvalFunc evalfunc
Definition: execnodes.h:92
struct MergeJoinClauseData * MergeJoinClause
Definition: execnodes.h:1826
ExprState * ordEqfunction
Definition: execnodes.h:2055
struct EPQState EPQState
void * ermExtra
Definition: execnodes.h:637
const struct TableFuncRoutine * routine
Definition: execnodes.h:1663
int iss_NumRuntimeKeys
Definition: execnodes.h:1375
struct MergeJoinState MergeJoinState
ExprState * startOffset
Definition: execnodes.h:2071
int64 frameheadgroup
Definition: execnodes.h:2085
MemoryContext tablecxt
Definition: execnodes.h:704
int es_jit_flags
Definition: execnodes.h:600
struct ExecAuxRowMark ExecAuxRowMark
TupleDesc jf_cleanTupType
Definition: execnodes.h:368
AttrNumber wholeAttNo
Definition: execnodes.h:657
HashJoinTuple hj_CurTuple
Definition: execnodes.h:1891
Oid * ii_UniqueProcs
Definition: execnodes.h:168
PlanState ps
Definition: execnodes.h:2132
bool table_filled
Definition: execnodes.h:2257
ResultRelInfo * es_result_relations
Definition: execnodes.h:520
TupleTableSlot * ri_ReturningSlot
Definition: execnodes.h:435
int64 aggregatedbase
Definition: execnodes.h:2067
Index prti
Definition: execnodes.h:630
struct ExprContext ExprContext
ExprState * docexpr
Definition: execnodes.h:1655
ScanDirection
Definition: sdir.h:22
EPQState mt_epqstate
Definition: execnodes.h:1122
bool * iss_OrderByTypByVals
Definition: execnodes.h:1387
struct TupleHashTableData * TupleHashTable
Definition: execnodes.h:678
long numOutput
Definition: execnodes.h:2250
bool tss_isCurrentOf
Definition: execnodes.h:1570
PlanState ** mergeplans
Definition: execnodes.h:1199
struct ValuesScanState ValuesScanState
struct AggStatePerHashData * AggStatePerHash
Definition: execnodes.h:1981
ExprState ** ri_GeneratedExprs
Definition: execnodes.h:458
TupleTableSlot * ecxt_innertuple
Definition: execnodes.h:226
bool havenullrows
Definition: execnodes.h:866
ParamExecData * ecxt_param_exec_vals
Definition: execnodes.h:235
ExprState * limitOffset
Definition: execnodes.h:2300
ExprState * check_exprstate
Definition: execnodes.h:912
struct MaterialState MaterialState
struct EState * ecxt_estate
Definition: execnodes.h:260
struct ProjectionInfo ProjectionInfo
List * hashkeys
Definition: execnodes.h:2222
struct HashState HashState
ProjectionInfo * ri_projectReturning
Definition: execnodes.h:467
bool eof_underlying
Definition: execnodes.h:1921
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:2220
int64 bound_Done
Definition: execnodes.h:1947
struct FdwRoutine * fdwroutine
Definition: execnodes.h:1738
AggStatePerAgg curperagg
Definition: execnodes.h:2001
struct PlanState * parent
Definition: execnodes.h:854
struct binaryheap * gm_heap
Definition: execnodes.h:2188
int as_first_partial_plan
Definition: execnodes.h:1170
AggStatePerHash perhash
Definition: execnodes.h:2024
ScanState ss
Definition: execnodes.h:1941
PlanState ps
Definition: execnodes.h:2145
bool outeropsset
Definition: execnodes.h:1026
MergeJoinClause mj_Clauses
Definition: execnodes.h:1832
dsa_pointer tbmiterator
Definition: execnodes.h:1497
Tuplestorestate * buffer
Definition: execnodes.h:2056
int es_instrument
Definition: execnodes.h:557
ExprState * oc_WhereClause
Definition: execnodes.h:386
struct GatherMergeState GatherMergeState
struct ScanKeyData * ioss_OrderByKeys
Definition: execnodes.h:1417
MemoryContext aggcontext
Definition: execnodes.h:2091
ExprState * repeatable
Definition: execnodes.h:1304
Datum * innermost_caseval
Definition: execnodes.h:111
bool iss_RuntimeKeysReady
Definition: execnodes.h:1376
TupleHashTable hashtable
Definition: execnodes.h:1233
PlanState * subplan
Definition: execnodes.h:1587
TupleTableSlot * origslot
Definition: execnodes.h:1067
struct LockRowsState LockRowsState
struct RecursiveUnionState RecursiveUnionState
bool ii_ReadyForInserts
Definition: execnodes.h:171
HashInstrumentation * hinstrument
Definition: execnodes.h:2225
List * hj_HashOperators
Definition: execnodes.h:1885
Bitmapset * grouped_cols
Definition: execnodes.h:2009
struct HashJoinTableData * HashJoinTable
Definition: execnodes.h:1878
ExprState ** ri_ConstraintExprs
Definition: execnodes.h:455
TBMIterateResult * tbmres
Definition: execnodes.h:1537
struct SharedJitInstrumentation * worker_jit_instrument
Definition: execnodes.h:959
bool resultopsset
Definition: execnodes.h:1028
TriggerDesc * ri_TrigDesc
Definition: execnodes.h:423
struct AggState AggState
Index rowmarkId
Definition: execnodes.h:631
TupleHashIterator hashiter
Definition: execnodes.h:2258
void * evalfunc_private
Definition: execnodes.h:98
Bitmapset * chgParam
Definition: execnodes.h:977
struct AggrefExprState AggrefExprState
struct ExprContext_CB * next
Definition: execnodes.h:190
Tuplestorestate * working_table
Definition: execnodes.h:1227
bool rs_checkqual
Definition: execnodes.h:1083
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:1889
MemoryContext perTableCxt
Definition: execnodes.h:1667
RecursiveUnionState * rustate
Definition: execnodes.h:1723
PlanState ** mt_plans
Definition: execnodes.h:1113
struct FunctionScanPerFuncState * funcstates
Definition: execnodes.h:1616
int num_hashes
Definition: execnodes.h:2023
SetFunctionReturnMode
Definition: execnodes.h:283
int64 spooled_rows
Definition: execnodes.h:2061
OnConflictSetState * ri_onConflict
Definition: execnodes.h:473
bool domainValue_isNull
Definition: execnodes.h:257
bool input_done
Definition: execnodes.h:2004
TupleDesc ps_ResultTupleDesc
Definition: execnodes.h:982
ExprDoneCond
Definition: execnodes.h:270
ProjectionInfo * combinedproj
Definition: execnodes.h:2032
ExprContext * curaggcontext
Definition: execnodes.h:2000
ExprContext * hashcontext
Definition: execnodes.h:1996
bool * ecxt_aggnulls
Definition: execnodes.h:245
bool mj_SkipMarkRestore
Definition: execnodes.h:1834
TupleConversionMap ** mt_per_subplan_tupconv_maps
Definition: execnodes.h:1142
struct NestLoopState NestLoopState
List * es_trig_target_relations
Definition: execnodes.h:541
Plan * plan
Definition: execnodes.h:1068
List * es_tupleTable
Definition: execnodes.h:552
LockClauseStrength
Definition: lockoptions.h:21
AggStatePerPhase phase
Definition: execnodes.h:1991
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:951
List * es_auxmodifytables
Definition: execnodes.h:564
Datum curArray
Definition: execnodes.h:858
Bitmapset * as_valid_subplans
Definition: execnodes.h:1175
uintptr_t Datum
Definition: postgres.h:367
TupleDesc tupDesc
Definition: execnodes.h:2177
ExecProcNodeMtd ExecProcNodeReal
Definition: execnodes.h:952
ExprContext * rowcontext
Definition: execnodes.h:1640
int ii_NumIndexAttrs
Definition: execnodes.h:157
TupleTableSlot * funnel_slot
Definition: execnodes.h:2150
TupleDesc scandesc
Definition: execnodes.h:992
List * ri_WithCheckOptions
Definition: execnodes.h:449
TupleDesc funcResultDesc
Definition: execnodes.h:811
Expr * expr
Definition: execnodes.h:782
struct TupleHashEntryData * TupleHashEntry
Definition: execnodes.h:677
TupleTableSlot * agg_row_slot
Definition: execnodes.h:2114
int es_num_result_relations
Definition: execnodes.h:521
TIDBitmap * biss_result
Definition: execnodes.h:1449
List * hj_Collations
Definition: execnodes.h:1886
List * ri_PartitionCheck
Definition: execnodes.h:476
unsigned int Index
Definition: c.h:475
struct TupleQueueReader ** reader
Definition: execnodes.h:2186
FmgrInfo * hashfunctions
Definition: execnodes.h:2248
TupleTableSlot * nl_NullInnerTupleSlot
Definition: execnodes.h:1800
Plan * plan
Definition: execnodes.h:945
TupleTableSlot * frametail_slot
Definition: execnodes.h:2111
MemoryContext hashtempcxt
Definition: execnodes.h:868
bool more_partitions
Definition: execnodes.h:2099
struct SampleScanState SampleScanState
List * es_tuple_routing_result_relations
Definition: execnodes.h:538
Relation ioss_RelationDesc
Definition: execnodes.h:1423
bool es_finished
Definition: execnodes.h:558
PlanState ps
Definition: execnodes.h:1198
void * ri_FdwState
Definition: execnodes.h:443
ExprState * array_expr
Definition: execnodes.h:1332
int allowedModes
Definition: execnodes.h:303
struct EState EState
TupleTableSlot * oc_ProjSlot
Definition: execnodes.h:384
JoinState js
Definition: execnodes.h:1830
MemoryContext hashtablecxt
Definition: execnodes.h:867
dsa_pointer prefetch_iterator
Definition: execnodes.h:1498
struct binaryheap * ms_heap
Definition: execnodes.h:1204
tuplehash_hash * hashtab
Definition: execnodes.h:698
bool scanopsfixed
Definition: execnodes.h:1021
ScanState ss
Definition: execnodes.h:1367
bool ii_Unique
Definition: execnodes.h:170
struct PlanState PlanState
SetFunctionReturnMode returnMode
Definition: execnodes.h:305
ExprContext ** aggcontexts
Definition: execnodes.h:1997
MemoryContext tableContext
Definition: execnodes.h:1234
TupleTableSlot * ecxt_outertuple
Definition: execnodes.h:228
TupleTableSlot * ri_TrigOldSlot
Definition: execnodes.h:436
bool hj_OuterNotEmpty
Definition: execnodes.h:1899
int64 frametailpos
Definition: execnodes.h:2064
List * ii_Expressions
Definition: execnodes.h:160
NodeTag type
Definition: execnodes.h:156
FmgrInfo * tab_eq_funcs
Definition: execnodes.h:875
TupleTableSlot * tableslot
Definition: execnodes.h:707
TupleTableSlot * mj_InnerTupleSlot
Definition: execnodes.h:1842
struct AggStatePerAggData * AggStatePerAgg
Definition: execnodes.h:1977
FmgrInfo startInRangeFunc
Definition: execnodes.h:2077
FunctionCallInfo fcinfo
Definition: execnodes.h:842
bool grouptail_valid
Definition: execnodes.h:2105
TupleTableSlot * framehead_slot
Definition: execnodes.h:2110
bool setop_done
Definition: execnodes.h:2249
struct UniqueState UniqueState
Relation * es_relations
Definition: execnodes.h:507
FmgrInfo * in_functions
Definition: execnodes.h:1664
Oid * tab_collations
Definition: execnodes.h:873
TupleTableSlot * subSlot
Definition: execnodes.h:2307
RowMarkType markType
Definition: execnodes.h:632
uint64 es_processed
Definition: execnodes.h:554
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:186
int as_whichplan
Definition: execnodes.h:1169
#define INDEX_MAX_KEYS
AggStatePerGroup * pergroups
Definition: execnodes.h:2018
int ii_ParallelWorkers
Definition: execnodes.h:174
size_t Size
Definition: c.h:466
AggSplit
Definition: nodes.h:775
bool funcReturnsTuple
Definition: execnodes.h:812
ExprContext * mj_OuterEContext
Definition: execnodes.h:1846
struct ParallelBitmapHeapState ParallelBitmapHeapState
bool randomAccess
Definition: execnodes.h:1942
RowMarkType
Definition: plannodes.h:1003
struct SetOpState SetOpState
SharedBitmapState state
Definition: execnodes.h:1502
bool sort_Done
Definition: execnodes.h:1945
Tuplestorestate * relation
Definition: execnodes.h:1709
ExprState * indexqual
Definition: execnodes.h:1414
TupleTableSlot * ecxt_scantuple
Definition: execnodes.h:224
SetOpStatePerGroup pergroup
Definition: execnodes.h:2252
Index es_range_table_size
Definition: execnodes.h:506
struct PartitionPruneState * ms_prune_state
Definition: execnodes.h:1207
List * es_subplanstates
Definition: execnodes.h:562
struct TsmRoutine * tsmroutine
Definition: execnodes.h:1306
TBMSharedIterator * shared_tbmiterator
Definition: execnodes.h:1550
AttrNumber toidAttNo
Definition: execnodes.h:656
bool outeropsfixed
Definition: execnodes.h:1022
ExprContext * iss_RuntimeContext
Definition: execnodes.h:1377
bool scanopsset
Definition: execnodes.h:1025
TBMIterator * tbmiterator
Definition: execnodes.h:1536
TupleTableSlot * mt_root_tuple_slot
Definition: execnodes.h:1130
PartitionDirectory es_partition_directory
Definition: execnodes.h:532
MemoryContext ecxt_per_query_memory
Definition: execnodes.h:231
TupleTableSlot * mj_NullOuterTupleSlot
Definition: execnodes.h:1844
int numphases
Definition: execnodes.h:1992
struct IndexInfo IndexInfo
bool ii_Concurrent
Definition: execnodes.h:172
FmgrInfo * lhs_hash_funcs
Definition: execnodes.h:876
int64 currentpos
Definition: execnodes.h:2062
ExprState * qual
Definition: execnodes.h:966
Tuplestorestate * setResult
Definition: execnodes.h:308
FmgrInfo * cur_eq_funcs
Definition: execnodes.h:877
bool setArgsValid
Definition: execnodes.h:827
bool resultopsfixed
Definition: execnodes.h:1024
PlanState * cteplanstate
Definition: execnodes.h:1686
ExprContext * econtext
Definition: execnodes.h:301
struct MergeAppendState MergeAppendState
JoinState js
Definition: execnodes.h:1797
IndexArrayKeyInfo * biss_ArrayKeys
Definition: execnodes.h:1454
List * mt_excludedtlist
Definition: execnodes.h:1124
int nextreader
Definition: execnodes.h:2155
TupleTableSlot * funcResultSlot
Definition: execnodes.h:805
TupleTableSlot * hj_HashTupleSlot
Definition: execnodes.h:1893
Definition: dsa.c:354
bool caseValue_isNull
Definition: execnodes.h:251
bool partition_spooled
Definition: execnodes.h:2097
Oid * ii_ExclusionOps
Definition: execnodes.h:164
AggStrategy
Definition: nodes.h:753
struct TidScanState TidScanState
TupleDesc setDesc
Definition: execnodes.h:309
ConditionVariable cv
Definition: execnodes.h:1503
ExprState * elidedFuncState
Definition: execnodes.h:790
struct ReturnSetInfo ReturnSetInfo
struct ScanKeyData * iss_OrderByKeys
Definition: execnodes.h:1372
int steps_alloc
Definition: execnodes.h:106
struct GatherState GatherState
HashJoinTable hj_HashTable
Definition: execnodes.h:1887
int es_top_eflags
Definition: execnodes.h:556
AggStatePerAgg peragg
Definition: execnodes.h:1994
bool framehead_valid
Definition: execnodes.h:2101
int steps_len
Definition: execnodes.h:105
PlanState ** appendplans
Definition: execnodes.h:1167
TBMIterator * prefetch_iterator
Definition: execnodes.h:1544
TupleTableSlot ** es_epqTupleSlot
Definition: execnodes.h:583
ResultRelInfo * es_root_result_relations
Definition: execnodes.h:530
TupleDesc descRight
Definition: execnodes.h:860
struct DomainConstraintState DomainConstraintState
IndexInfo ** ri_IndexRelationInfo
Definition: execnodes.h:420
List * lr_arowMarks
Definition: execnodes.h:2270
struct ExprContext_CB ExprContext_CB
NodeTag type
Definition: execnodes.h:851
bool * es_epqScanDone
Definition: execnodes.h:584
struct JunkFilter JunkFilter
struct ScanKeyData * iss_ScanKeys
Definition: execnodes.h:1370
ExprDoneCond * elemdone
Definition: execnodes.h:1097
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:2003
int epqParam
Definition: execnodes.h:1070
ParamListInfo es_param_list_info
Definition: execnodes.h:544
List * es_exprcontexts
Definition: execnodes.h:560
MemoryContext tempcxt
Definition: execnodes.h:705
ProjectionInfo * projRight
Definition: execnodes.h:862
MemoryContext partcontext
Definition: execnodes.h:2090
struct CteScanState CteScanState
ExprDoneCond isDone
Definition: execnodes.h:306
struct ResultState ResultState
WindowFunc * wfunc
Definition: execnodes.h:763
List * aggs
Definition: execnodes.h:1986
ExprContext * biss_RuntimeContext
Definition: execnodes.h:1457
bool mj_ExtraMarks
Definition: execnodes.h:1835
EState * estate
Definition: execnodes.h:1065
Datum * iss_OrderByValues
Definition: execnodes.h:1384
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:1373
Tuplestorestate * cte_table
Definition: execnodes.h:1690
List ** exprlists
Definition: execnodes.h:1641
ExprContext * pi_exprContext
Definition: execnodes.h:333
struct SortState SortState
Definition: pg_list.h:50
Tuplestorestate * tupstore
Definition: execnodes.h:1668
int Buffer
Definition: buf.h:23
bool havehashrows
Definition: execnodes.h:865
Datum resvalue
Definition: execnodes.h:75
int16 AttrNumber
Definition: attnum.h:21
ExprState * rowexpr
Definition: execnodes.h:1656
JoinState js
Definition: execnodes.h:1882
struct IndexScanDescData * iss_ScanDesc
Definition: execnodes.h:1379
struct IndexOnlyScanState IndexOnlyScanState
LockWaitPolicy
Definition: lockoptions.h:36
List * ri_onConflictArbiterIndexes
Definition: execnodes.h:470
CmdType
Definition: nodes.h:667
TupleHashTable hashnulls
Definition: execnodes.h:864
AttrNumber ctidAttNo
Definition: execnodes.h:655
RelationPtr ri_IndexRelationDescs
Definition: execnodes.h:417
PlanState ps
Definition: execnodes.h:2299
struct SubPlanState SubPlanState
TBMSharedIterator * shared_prefetch_iterator
Definition: execnodes.h:1551
struct IndexScanState IndexScanState
TupleHashTable hashtable
Definition: execnodes.h:2255
ExprState * hashclauses
Definition: execnodes.h:1883
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:1378
List ** mt_arowmarks
Definition: execnodes.h:1121
TupleTableSlot * mj_OuterTupleSlot
Definition: execnodes.h:1841
SortSupport gm_sortkeys
Definition: execnodes.h:2179
pairingheap * iss_ReorderQueue
Definition: execnodes.h:1382
const TupleTableSlotOps * outerops
Definition: execnodes.h:1018
unsigned char bool
Definition: c.h:308
struct SharedHashInfo SharedHashInfo
struct LimitState LimitState
int64 tuples_needed
Definition: execnodes.h:2148
AggStatePerGroup * all_pergroups
Definition: execnodes.h:2030
struct WorkTableScanState WorkTableScanState
struct JoinState JoinState
Oid ii_Am
Definition: execnodes.h:175
PlanState ps
Definition: execnodes.h:1080
ScanState ss
Definition: execnodes.h:1302
ResultRelInfo * es_result_relation_info
Definition: execnodes.h:522