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