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