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