PostgreSQL Source Code  git master
plannodes.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * plannodes.h
4  * definitions for query plan nodes
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/nodes/plannodes.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PLANNODES_H
15 #define PLANNODES_H
16 
17 #include "access/sdir.h"
18 #include "lib/stringinfo.h"
19 #include "nodes/bitmapset.h"
20 #include "nodes/lockoptions.h"
21 #include "nodes/primnodes.h"
22 
23 
24 /* ----------------------------------------------------------------
25  * node definitions
26  * ----------------------------------------------------------------
27  */
28 
29 /* ----------------
30  * PlannedStmt node
31  *
32  * The output of the planner is a Plan tree headed by a PlannedStmt node.
33  * PlannedStmt holds the "one time" information needed by the executor.
34  *
35  * For simplicity in APIs, we also wrap utility statements in PlannedStmt
36  * nodes; in such cases, commandType == CMD_UTILITY, the statement itself
37  * is in the utilityStmt field, and the rest of the struct is mostly dummy.
38  * (We do use canSetTag, stmt_location, stmt_len, and possibly queryId.)
39  * ----------------
40  */
41 typedef struct PlannedStmt
42 {
44 
45  CmdType commandType; /* select|insert|update|delete|utility */
46 
47  uint64 queryId; /* query identifier (copied from Query) */
48 
49  bool hasReturning; /* is it insert|update|delete RETURNING? */
50 
51  bool hasModifyingCTE; /* has insert|update|delete in WITH? */
52 
53  bool canSetTag; /* do I set the command result tag? */
54 
55  bool transientPlan; /* redo plan when TransactionXmin changes? */
56 
57  bool dependsOnRole; /* is plan specific to current role? */
58 
59  bool parallelModeNeeded; /* parallel mode required to execute? */
60 
61  int jitFlags; /* which forms of JIT should be performed */
62 
63  struct Plan *planTree; /* tree of Plan nodes */
64 
65  List *rtable; /* list of RangeTblEntry nodes */
66 
67  /* rtable indexes of target relations for INSERT/UPDATE/DELETE */
68  List *resultRelations; /* integer list of RT indexes, or NIL */
69 
70  /*
71  * rtable indexes of non-leaf target relations for UPDATE/DELETE on all
72  * the partitioned tables mentioned in the query.
73  */
75 
76  /*
77  * rtable indexes of root target relations for UPDATE/DELETE; this list
78  * maintains a subset of the RT indexes in nonleafResultRelations,
79  * indicating the roots of the respective partition hierarchies.
80  */
82 
83  List *subplans; /* Plan trees for SubPlan expressions; note
84  * that some could be NULL */
85 
86  Bitmapset *rewindPlanIDs; /* indices of subplans that require REWIND */
87 
88  List *rowMarks; /* a list of PlanRowMark's */
89 
90  List *relationOids; /* OIDs of relations the plan depends on */
91 
92  List *invalItems; /* other dependencies, as PlanInvalItems */
93 
94  List *paramExecTypes; /* type OIDs for PARAM_EXEC Params */
95 
96  Node *utilityStmt; /* non-null if this is utility stmt */
97 
98  /* statement location in source string (copied from Query) */
99  int stmt_location; /* start location, or -1 if unknown */
100  int stmt_len; /* length in bytes; 0 means "rest of string" */
101 } PlannedStmt;
102 
103 /* macro for fetching the Plan associated with a SubPlan node */
104 #define exec_subplan_get_plan(plannedstmt, subplan) \
105  ((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))
106 
107 
108 /* ----------------
109  * Plan node
110  *
111  * All plan nodes "derive" from the Plan structure by having the
112  * Plan structure as the first field. This ensures that everything works
113  * when nodes are cast to Plan's. (node pointers are frequently cast to Plan*
114  * when passed around generically in the executor)
115  *
116  * We never actually instantiate any Plan nodes; this is just the common
117  * abstract superclass for all Plan-type nodes.
118  * ----------------
119  */
120 typedef struct Plan
121 {
123 
124  /*
125  * estimated execution costs for plan (see costsize.c for more info)
126  */
127  Cost startup_cost; /* cost expended before fetching any tuples */
128  Cost total_cost; /* total cost (assuming all tuples fetched) */
129 
130  /*
131  * planner's estimate of result size of this plan step
132  */
133  double plan_rows; /* number of rows plan is expected to emit */
134  int plan_width; /* average row width in bytes */
135 
136  /*
137  * information needed for parallel query
138  */
139  bool parallel_aware; /* engage parallel-aware logic? */
140  bool parallel_safe; /* OK to use as part of parallel plan? */
141 
142  /*
143  * Common structural data for all Plan types.
144  */
145  int plan_node_id; /* unique across entire final plan tree */
146  List *targetlist; /* target list to be computed at this node */
147  List *qual; /* implicitly-ANDed qual conditions */
148  struct Plan *lefttree; /* input plan tree(s) */
149  struct Plan *righttree;
150  List *initPlan; /* Init Plan nodes (un-correlated expr
151  * subselects) */
152 
153  /*
154  * Information for management of parameter-change-driven rescanning
155  *
156  * extParam includes the paramIDs of all external PARAM_EXEC params
157  * affecting this plan node or its children. setParam params from the
158  * node's initPlans are not included, but their extParams are.
159  *
160  * allParam includes all the extParam paramIDs, plus the IDs of local
161  * params that affect the node (i.e., the setParams of its initplans).
162  * These are _all_ the PARAM_EXEC params that affect this node.
163  */
166 } Plan;
167 
168 /* ----------------
169  * these are defined to avoid confusion problems with "left"
170  * and "right" and "inner" and "outer". The convention is that
171  * the "left" plan is the "outer" plan and the "right" plan is
172  * the inner plan, but these make the code more readable.
173  * ----------------
174  */
175 #define innerPlan(node) (((Plan *)(node))->righttree)
176 #define outerPlan(node) (((Plan *)(node))->lefttree)
177 
178 
179 /* ----------------
180  * Result node -
181  * If no outer plan, evaluate a variable-free targetlist.
182  * If outer plan, return tuples from outer plan (after a level of
183  * projection as shown by targetlist).
184  *
185  * If resconstantqual isn't NULL, it represents a one-time qualification
186  * test (i.e., one that doesn't depend on any variables from the outer plan,
187  * so needs to be evaluated only once).
188  * ----------------
189  */
190 typedef struct Result
191 {
194 } Result;
195 
196 /* ----------------
197  * ProjectSet node -
198  * Apply a projection that includes set-returning functions to the
199  * output tuples of the outer plan.
200  * ----------------
201  */
202 typedef struct ProjectSet
203 {
205 } ProjectSet;
206 
207 /* ----------------
208  * ModifyTable node -
209  * Apply rows produced by subplan(s) to result table(s),
210  * by inserting, updating, or deleting.
211  *
212  * Note that rowMarks and epqParam are presumed to be valid for all the
213  * subplan(s); they can't contain any info that varies across subplans.
214  * ----------------
215  */
216 typedef struct ModifyTable
217 {
219  CmdType operation; /* INSERT, UPDATE, or DELETE */
220  bool canSetTag; /* do we set the command tag/es_processed? */
221  Index nominalRelation; /* Parent RT index for use of EXPLAIN */
222  /* RT indexes of non-leaf tables in a partition tree */
224  bool partColsUpdated; /* some part key in hierarchy updated */
225  List *resultRelations; /* integer list of RT indexes */
226  int resultRelIndex; /* index of first resultRel in plan's list */
227  int rootResultRelIndex; /* index of the partitioned table root */
228  List *plans; /* plan(s) producing source data */
229  List *withCheckOptionLists; /* per-target-table WCO lists */
230  List *returningLists; /* per-target-table RETURNING tlists */
231  List *fdwPrivLists; /* per-target-table FDW private data lists */
232  Bitmapset *fdwDirectModifyPlans; /* indices of FDW DM plans */
233  List *rowMarks; /* PlanRowMarks (non-locking only) */
234  int epqParam; /* ID of Param for EvalPlanQual re-eval */
235  OnConflictAction onConflictAction; /* ON CONFLICT action */
236  List *arbiterIndexes; /* List of ON CONFLICT arbiter index OIDs */
237  List *onConflictSet; /* SET for INSERT ON CONFLICT DO UPDATE */
238  Node *onConflictWhere; /* WHERE for ON CONFLICT UPDATE */
239  Index exclRelRTI; /* RTI of the EXCLUDED pseudo relation */
240  List *exclRelTlist; /* tlist of the EXCLUDED pseudo relation */
241 } ModifyTable;
242 
243 /* ----------------
244  * Append node -
245  * Generate the concatenation of the results of sub-plans.
246  * ----------------
247  */
248 typedef struct Append
249 {
251  /* RT indexes of non-leaf tables in a partition tree */
254 
255  /*
256  * All 'appendplans' preceding this index are non-partial plans. All
257  * 'appendplans' from this index onwards are partial plans.
258  */
260 
261  /*
262  * Mapping details for run-time subplan pruning, one per partitioned_rels
263  */
265 } Append;
266 
267 /* ----------------
268  * MergeAppend node -
269  * Merge the results of pre-sorted sub-plans to preserve the ordering.
270  * ----------------
271  */
272 typedef struct MergeAppend
273 {
275  /* RT indexes of non-leaf tables in a partition tree */
278  /* remaining fields are just like the sort-key info in struct Sort */
279  int numCols; /* number of sort-key columns */
280  AttrNumber *sortColIdx; /* their indexes in the target list */
281  Oid *sortOperators; /* OIDs of operators to sort them by */
282  Oid *collations; /* OIDs of collations */
283  bool *nullsFirst; /* NULLS FIRST/LAST directions */
284 } MergeAppend;
285 
286 /* ----------------
287  * RecursiveUnion node -
288  * Generate a recursive union of two subplans.
289  *
290  * The "outer" subplan is always the non-recursive term, and the "inner"
291  * subplan is the recursive term.
292  * ----------------
293  */
294 typedef struct RecursiveUnion
295 {
297  int wtParam; /* ID of Param representing work table */
298  /* Remaining fields are zero/null in UNION ALL case */
299  int numCols; /* number of columns to check for
300  * duplicate-ness */
301  AttrNumber *dupColIdx; /* their indexes in the target list */
302  Oid *dupOperators; /* equality operators to compare with */
303  long numGroups; /* estimated number of groups in input */
305 
306 /* ----------------
307  * BitmapAnd node -
308  * Generate the intersection of the results of sub-plans.
309  *
310  * The subplans must be of types that yield tuple bitmaps. The targetlist
311  * and qual fields of the plan are unused and are always NIL.
312  * ----------------
313  */
314 typedef struct BitmapAnd
315 {
318 } BitmapAnd;
319 
320 /* ----------------
321  * BitmapOr node -
322  * Generate the union of the results of sub-plans.
323  *
324  * The subplans must be of types that yield tuple bitmaps. The targetlist
325  * and qual fields of the plan are unused and are always NIL.
326  * ----------------
327  */
328 typedef struct BitmapOr
329 {
331  bool isshared;
333 } BitmapOr;
334 
335 /*
336  * ==========
337  * Scan nodes
338  * ==========
339  */
340 typedef struct Scan
341 {
343  Index scanrelid; /* relid is index into the range table */
344 } Scan;
345 
346 /* ----------------
347  * sequential scan node
348  * ----------------
349  */
350 typedef Scan SeqScan;
351 
352 /* ----------------
353  * table sample scan node
354  * ----------------
355  */
356 typedef struct SampleScan
357 {
359  /* use struct pointer to avoid including parsenodes.h here */
361 } SampleScan;
362 
363 /* ----------------
364  * index scan node
365  *
366  * indexqualorig is an implicitly-ANDed list of index qual expressions, each
367  * in the same form it appeared in the query WHERE condition. Each should
368  * be of the form (indexkey OP comparisonval) or (comparisonval OP indexkey).
369  * The indexkey is a Var or expression referencing column(s) of the index's
370  * base table. The comparisonval might be any expression, but it won't use
371  * any columns of the base table. The expressions are ordered by index
372  * column position (but items referencing the same index column can appear
373  * in any order). indexqualorig is used at runtime only if we have to recheck
374  * a lossy indexqual.
375  *
376  * indexqual has the same form, but the expressions have been commuted if
377  * necessary to put the indexkeys on the left, and the indexkeys are replaced
378  * by Var nodes identifying the index columns (their varno is INDEX_VAR and
379  * their varattno is the index column number).
380  *
381  * indexorderbyorig is similarly the original form of any ORDER BY expressions
382  * that are being implemented by the index, while indexorderby is modified to
383  * have index column Vars on the left-hand side. Here, multiple expressions
384  * must appear in exactly the ORDER BY order, and this is not necessarily the
385  * index column order. Only the expressions are provided, not the auxiliary
386  * sort-order information from the ORDER BY SortGroupClauses; it's assumed
387  * that the sort ordering is fully determinable from the top-level operators.
388  * indexorderbyorig is used at runtime to recheck the ordering, if the index
389  * cannot calculate an accurate ordering. It is also needed for EXPLAIN.
390  *
391  * indexorderbyops is a list of the OIDs of the operators used to sort the
392  * ORDER BY expressions. This is used together with indexorderbyorig to
393  * recheck ordering at run time. (Note that indexorderby, indexorderbyorig,
394  * and indexorderbyops are used for amcanorderbyop cases, not amcanorder.)
395  *
396  * indexorderdir specifies the scan ordering, for indexscans on amcanorder
397  * indexes (for other indexes it should be "don't care").
398  * ----------------
399  */
400 typedef struct IndexScan
401 {
403  Oid indexid; /* OID of index to scan */
404  List *indexqual; /* list of index quals (usually OpExprs) */
405  List *indexqualorig; /* the same in original form */
406  List *indexorderby; /* list of index ORDER BY exprs */
407  List *indexorderbyorig; /* the same in original form */
408  List *indexorderbyops; /* OIDs of sort ops for ORDER BY exprs */
409  ScanDirection indexorderdir; /* forward or backward or don't care */
410 } IndexScan;
411 
412 /* ----------------
413  * index-only scan node
414  *
415  * IndexOnlyScan is very similar to IndexScan, but it specifies an
416  * index-only scan, in which the data comes from the index not the heap.
417  * Because of this, *all* Vars in the plan node's targetlist, qual, and
418  * index expressions reference index columns and have varno = INDEX_VAR.
419  * Hence we do not need separate indexqualorig and indexorderbyorig lists,
420  * since their contents would be equivalent to indexqual and indexorderby.
421  *
422  * To help EXPLAIN interpret the index Vars for display, we provide
423  * indextlist, which represents the contents of the index as a targetlist
424  * with one TLE per index column. Vars appearing in this list reference
425  * the base table, and this is the only field in the plan node that may
426  * contain such Vars.
427  * ----------------
428  */
429 typedef struct IndexOnlyScan
430 {
432  Oid indexid; /* OID of index to scan */
433  List *indexqual; /* list of index quals (usually OpExprs) */
434  List *indexorderby; /* list of index ORDER BY exprs */
435  List *indextlist; /* TargetEntry list describing index's cols */
436  ScanDirection indexorderdir; /* forward or backward or don't care */
437 } IndexOnlyScan;
438 
439 /* ----------------
440  * bitmap index scan node
441  *
442  * BitmapIndexScan delivers a bitmap of potential tuple locations;
443  * it does not access the heap itself. The bitmap is used by an
444  * ancestor BitmapHeapScan node, possibly after passing through
445  * intermediate BitmapAnd and/or BitmapOr nodes to combine it with
446  * the results of other BitmapIndexScans.
447  *
448  * The fields have the same meanings as for IndexScan, except we don't
449  * store a direction flag because direction is uninteresting.
450  *
451  * In a BitmapIndexScan plan node, the targetlist and qual fields are
452  * not used and are always NIL. The indexqualorig field is unused at
453  * run time too, but is saved for the benefit of EXPLAIN.
454  * ----------------
455  */
456 typedef struct BitmapIndexScan
457 {
459  Oid indexid; /* OID of index to scan */
460  bool isshared; /* Create shared bitmap if set */
461  List *indexqual; /* list of index quals (OpExprs) */
462  List *indexqualorig; /* the same in original form */
464 
465 /* ----------------
466  * bitmap sequential scan node
467  *
468  * This needs a copy of the qual conditions being used by the input index
469  * scans because there are various cases where we need to recheck the quals;
470  * for example, when the bitmap is lossy about the specific rows on a page
471  * that meet the index condition.
472  * ----------------
473  */
474 typedef struct BitmapHeapScan
475 {
477  List *bitmapqualorig; /* index quals, in standard expr form */
479 
480 /* ----------------
481  * tid scan node
482  *
483  * tidquals is an implicitly OR'ed list of qual expressions of the form
484  * "CTID = pseudoconstant" or "CTID = ANY(pseudoconstant_array)".
485  * ----------------
486  */
487 typedef struct TidScan
488 {
490  List *tidquals; /* qual(s) involving CTID = something */
491 } TidScan;
492 
493 /* ----------------
494  * subquery scan node
495  *
496  * SubqueryScan is for scanning the output of a sub-query in the range table.
497  * We often need an extra plan node above the sub-query's plan to perform
498  * expression evaluations (which we can't push into the sub-query without
499  * risking changing its semantics). Although we are not scanning a physical
500  * relation, we make this a descendant of Scan anyway for code-sharing
501  * purposes.
502  *
503  * Note: we store the sub-plan in the type-specific subplan field, not in
504  * the generic lefttree field as you might expect. This is because we do
505  * not want plan-tree-traversal routines to recurse into the subplan without
506  * knowing that they are changing Query contexts.
507  * ----------------
508  */
509 typedef struct SubqueryScan
510 {
513 } SubqueryScan;
514 
515 /* ----------------
516  * FunctionScan node
517  * ----------------
518  */
519 typedef struct FunctionScan
520 {
522  List *functions; /* list of RangeTblFunction nodes */
523  bool funcordinality; /* WITH ORDINALITY */
524 } FunctionScan;
525 
526 /* ----------------
527  * ValuesScan node
528  * ----------------
529  */
530 typedef struct ValuesScan
531 {
533  List *values_lists; /* list of expression lists */
534 } ValuesScan;
535 
536 /* ----------------
537  * TableFunc scan node
538  * ----------------
539  */
540 typedef struct TableFuncScan
541 {
543  TableFunc *tablefunc; /* table function node */
544 } TableFuncScan;
545 
546 /* ----------------
547  * CteScan node
548  * ----------------
549  */
550 typedef struct CteScan
551 {
553  int ctePlanId; /* ID of init SubPlan for CTE */
554  int cteParam; /* ID of Param representing CTE output */
555 } CteScan;
556 
557 /* ----------------
558  * NamedTuplestoreScan node
559  * ----------------
560  */
561 typedef struct NamedTuplestoreScan
562 {
564  char *enrname; /* Name given to Ephemeral Named Relation */
566 
567 /* ----------------
568  * WorkTableScan node
569  * ----------------
570  */
571 typedef struct WorkTableScan
572 {
574  int wtParam; /* ID of Param representing work table */
575 } WorkTableScan;
576 
577 /* ----------------
578  * ForeignScan node
579  *
580  * fdw_exprs and fdw_private are both under the control of the foreign-data
581  * wrapper, but fdw_exprs is presumed to contain expression trees and will
582  * be post-processed accordingly by the planner; fdw_private won't be.
583  * Note that everything in both lists must be copiable by copyObject().
584  * One way to store an arbitrary blob of bytes is to represent it as a bytea
585  * Const. Usually, though, you'll be better off choosing a representation
586  * that can be dumped usefully by nodeToString().
587  *
588  * fdw_scan_tlist is a targetlist describing the contents of the scan tuple
589  * returned by the FDW; it can be NIL if the scan tuple matches the declared
590  * rowtype of the foreign table, which is the normal case for a simple foreign
591  * table scan. (If the plan node represents a foreign join, fdw_scan_tlist
592  * is required since there is no rowtype available from the system catalogs.)
593  * When fdw_scan_tlist is provided, Vars in the node's tlist and quals must
594  * have varno INDEX_VAR, and their varattnos correspond to resnos in the
595  * fdw_scan_tlist (which are also column numbers in the actual scan tuple).
596  * fdw_scan_tlist is never actually executed; it just holds expression trees
597  * describing what is in the scan tuple's columns.
598  *
599  * fdw_recheck_quals should contain any quals which the core system passed to
600  * the FDW but which were not added to scan.plan.qual; that is, it should
601  * contain the quals being checked remotely. This is needed for correct
602  * behavior during EvalPlanQual rechecks.
603  *
604  * When the plan node represents a foreign join, scan.scanrelid is zero and
605  * fs_relids must be consulted to identify the join relation. (fs_relids
606  * is valid for simple scans as well, but will always match scan.scanrelid.)
607  * ----------------
608  */
609 typedef struct ForeignScan
610 {
612  CmdType operation; /* SELECT/INSERT/UPDATE/DELETE */
613  Oid fs_server; /* OID of foreign server */
614  List *fdw_exprs; /* expressions that FDW may evaluate */
615  List *fdw_private; /* private data for FDW */
616  List *fdw_scan_tlist; /* optional tlist describing scan tuple */
617  List *fdw_recheck_quals; /* original quals not in scan.plan.qual */
618  Bitmapset *fs_relids; /* RTIs generated by this scan */
619  bool fsSystemCol; /* true if any "system column" is needed */
620 } ForeignScan;
621 
622 /* ----------------
623  * CustomScan node
624  *
625  * The comments for ForeignScan's fdw_exprs, fdw_private, fdw_scan_tlist,
626  * and fs_relids fields apply equally to CustomScan's custom_exprs,
627  * custom_private, custom_scan_tlist, and custom_relids fields. The
628  * convention of setting scan.scanrelid to zero for joins applies as well.
629  *
630  * Note that since Plan trees can be copied, custom scan providers *must*
631  * fit all plan data they need into those fields; embedding CustomScan in
632  * a larger struct will not work.
633  * ----------------
634  */
635 struct CustomScanMethods;
636 
637 typedef struct CustomScan
638 {
640  uint32 flags; /* mask of CUSTOMPATH_* flags, see
641  * nodes/extensible.h */
642  List *custom_plans; /* list of Plan nodes, if any */
643  List *custom_exprs; /* expressions that custom code may evaluate */
644  List *custom_private; /* private data for custom code */
645  List *custom_scan_tlist; /* optional tlist describing scan tuple */
646  Bitmapset *custom_relids; /* RTIs generated by this scan */
647  const struct CustomScanMethods *methods;
648 } CustomScan;
649 
650 /*
651  * ==========
652  * Join nodes
653  * ==========
654  */
655 
656 /* ----------------
657  * Join node
658  *
659  * jointype: rule for joining tuples from left and right subtrees
660  * inner_unique each outer tuple can match to no more than one inner tuple
661  * joinqual: qual conditions that came from JOIN/ON or JOIN/USING
662  * (plan.qual contains conditions that came from WHERE)
663  *
664  * When jointype is INNER, joinqual and plan.qual are semantically
665  * interchangeable. For OUTER jointypes, the two are *not* interchangeable;
666  * only joinqual is used to determine whether a match has been found for
667  * the purpose of deciding whether to generate null-extended tuples.
668  * (But plan.qual is still applied before actually returning a tuple.)
669  * For an outer join, only joinquals are allowed to be used as the merge
670  * or hash condition of a merge or hash join.
671  *
672  * inner_unique is set if the joinquals are such that no more than one inner
673  * tuple could match any given outer tuple. This allows the executor to
674  * skip searching for additional matches. (This must be provable from just
675  * the joinquals, ignoring plan.qual, due to where the executor tests it.)
676  * ----------------
677  */
678 typedef struct Join
679 {
683  List *joinqual; /* JOIN quals (in addition to plan.qual) */
684 } Join;
685 
686 /* ----------------
687  * nest loop join node
688  *
689  * The nestParams list identifies any executor Params that must be passed
690  * into execution of the inner subplan carrying values from the current row
691  * of the outer subplan. Currently we restrict these values to be simple
692  * Vars, but perhaps someday that'd be worth relaxing. (Note: during plan
693  * creation, the paramval can actually be a PlaceHolderVar expression; but it
694  * must be a Var with varno OUTER_VAR by the time it gets to the executor.)
695  * ----------------
696  */
697 typedef struct NestLoop
698 {
700  List *nestParams; /* list of NestLoopParam nodes */
701 } NestLoop;
702 
703 typedef struct NestLoopParam
704 {
706  int paramno; /* number of the PARAM_EXEC Param to set */
707  Var *paramval; /* outer-relation Var to assign to Param */
708 } NestLoopParam;
709 
710 /* ----------------
711  * merge join node
712  *
713  * The expected ordering of each mergeable column is described by a btree
714  * opfamily OID, a collation OID, a direction (BTLessStrategyNumber or
715  * BTGreaterStrategyNumber) and a nulls-first flag. Note that the two sides
716  * of each mergeclause may be of different datatypes, but they are ordered the
717  * same way according to the common opfamily and collation. The operator in
718  * each mergeclause must be an equality operator of the indicated opfamily.
719  * ----------------
720  */
721 typedef struct MergeJoin
722 {
724  bool skip_mark_restore; /* Can we skip mark/restore calls? */
725  List *mergeclauses; /* mergeclauses as expression trees */
726  /* these are arrays, but have the same length as the mergeclauses list: */
727  Oid *mergeFamilies; /* per-clause OIDs of btree opfamilies */
728  Oid *mergeCollations; /* per-clause OIDs of collations */
729  int *mergeStrategies; /* per-clause ordering (ASC or DESC) */
730  bool *mergeNullsFirst; /* per-clause nulls ordering */
731 } MergeJoin;
732 
733 /* ----------------
734  * hash join node
735  * ----------------
736  */
737 typedef struct HashJoin
738 {
741 } HashJoin;
742 
743 /* ----------------
744  * materialization node
745  * ----------------
746  */
747 typedef struct Material
748 {
750 } Material;
751 
752 /* ----------------
753  * sort node
754  * ----------------
755  */
756 typedef struct Sort
757 {
759  int numCols; /* number of sort-key columns */
760  AttrNumber *sortColIdx; /* their indexes in the target list */
761  Oid *sortOperators; /* OIDs of operators to sort them by */
762  Oid *collations; /* OIDs of collations */
763  bool *nullsFirst; /* NULLS FIRST/LAST directions */
764 } Sort;
765 
766 /* ---------------
767  * group node -
768  * Used for queries with GROUP BY (but no aggregates) specified.
769  * The input must be presorted according to the grouping columns.
770  * ---------------
771  */
772 typedef struct Group
773 {
775  int numCols; /* number of grouping columns */
776  AttrNumber *grpColIdx; /* their indexes in the target list */
777  Oid *grpOperators; /* equality operators to compare with */
778 } Group;
779 
780 /* ---------------
781  * aggregate node
782  *
783  * An Agg node implements plain or grouped aggregation. For grouped
784  * aggregation, we can work with presorted input or unsorted input;
785  * the latter strategy uses an internal hashtable.
786  *
787  * Notice the lack of any direct info about the aggregate functions to be
788  * computed. They are found by scanning the node's tlist and quals during
789  * executor startup. (It is possible that there are no aggregate functions;
790  * this could happen if they get optimized away by constant-folding, or if
791  * we are using the Agg node to implement hash-based grouping.)
792  * ---------------
793  */
794 typedef struct Agg
795 {
797  AggStrategy aggstrategy; /* basic strategy, see nodes.h */
798  AggSplit aggsplit; /* agg-splitting mode, see nodes.h */
799  int numCols; /* number of grouping columns */
800  AttrNumber *grpColIdx; /* their indexes in the target list */
801  Oid *grpOperators; /* equality operators to compare with */
802  long numGroups; /* estimated number of groups in input */
803  Bitmapset *aggParams; /* IDs of Params used in Aggref inputs */
804  /* Note: planner provides numGroups & aggParams only in HASHED/MIXED case */
805  List *groupingSets; /* grouping sets to use */
806  List *chain; /* chained Agg/Sort nodes */
807 } Agg;
808 
809 /* ----------------
810  * window aggregate node
811  * ----------------
812  */
813 typedef struct WindowAgg
814 {
816  Index winref; /* ID referenced by window functions */
817  int partNumCols; /* number of columns in partition clause */
818  AttrNumber *partColIdx; /* their indexes in the target list */
819  Oid *partOperators; /* equality operators for partition columns */
820  int ordNumCols; /* number of columns in ordering clause */
821  AttrNumber *ordColIdx; /* their indexes in the target list */
822  Oid *ordOperators; /* equality operators for ordering columns */
823  int frameOptions; /* frame_clause options, see WindowDef */
824  Node *startOffset; /* expression for starting bound, if any */
825  Node *endOffset; /* expression for ending bound, if any */
826  /* these fields are used with RANGE offset PRECEDING/FOLLOWING: */
827  Oid startInRangeFunc; /* in_range function for startOffset */
828  Oid endInRangeFunc; /* in_range function for endOffset */
829  Oid inRangeColl; /* collation for in_range tests */
830  bool inRangeAsc; /* use ASC sort order for in_range tests? */
831  bool inRangeNullsFirst; /* nulls sort first for in_range tests? */
832 } WindowAgg;
833 
834 /* ----------------
835  * unique node
836  * ----------------
837  */
838 typedef struct Unique
839 {
841  int numCols; /* number of columns to check for uniqueness */
842  AttrNumber *uniqColIdx; /* their indexes in the target list */
843  Oid *uniqOperators; /* equality operators to compare with */
844 } Unique;
845 
846 /* ------------
847  * gather node
848  *
849  * Note: rescan_param is the ID of a PARAM_EXEC parameter slot. That slot
850  * will never actually contain a value, but the Gather node must flag it as
851  * having changed whenever it is rescanned. The child parallel-aware scan
852  * nodes are marked as depending on that parameter, so that the rescan
853  * machinery is aware that their output is likely to change across rescans.
854  * In some cases we don't need a rescan Param, so rescan_param is set to -1.
855  * ------------
856  */
857 typedef struct Gather
858 {
860  int num_workers; /* planned number of worker processes */
861  int rescan_param; /* ID of Param that signals a rescan, or -1 */
862  bool single_copy; /* don't execute plan more than once */
863  bool invisible; /* suppress EXPLAIN display (for testing)? */
864  Bitmapset *initParam; /* param id's of initplans which are referred
865  * at gather or one of it's child node */
866 } Gather;
867 
868 /* ------------
869  * gather merge node
870  * ------------
871  */
872 typedef struct GatherMerge
873 {
875  int num_workers; /* planned number of worker processes */
876  int rescan_param; /* ID of Param that signals a rescan, or -1 */
877  /* remaining fields are just like the sort-key info in struct Sort */
878  int numCols; /* number of sort-key columns */
879  AttrNumber *sortColIdx; /* their indexes in the target list */
880  Oid *sortOperators; /* OIDs of operators to sort them by */
881  Oid *collations; /* OIDs of collations */
882  bool *nullsFirst; /* NULLS FIRST/LAST directions */
883  Bitmapset *initParam; /* param id's of initplans which are referred
884  * at gather merge or one of it's child node */
885 } GatherMerge;
886 
887 /* ----------------
888  * hash build node
889  *
890  * If the executor is supposed to try to apply skew join optimization, then
891  * skewTable/skewColumn/skewInherit identify the outer relation's join key
892  * column, from which the relevant MCV statistics can be fetched.
893  * ----------------
894  */
895 typedef struct Hash
896 {
898  Oid skewTable; /* outer join key's table OID, or InvalidOid */
899  AttrNumber skewColumn; /* outer join key's column #, or zero */
900  bool skewInherit; /* is outer join rel an inheritance tree? */
901  /* all other info is in the parent HashJoin node */
902  double rows_total; /* estimate total rows if parallel_aware */
903 } Hash;
904 
905 /* ----------------
906  * setop node
907  * ----------------
908  */
909 typedef struct SetOp
910 {
912  SetOpCmd cmd; /* what to do, see nodes.h */
913  SetOpStrategy strategy; /* how to do it, see nodes.h */
914  int numCols; /* number of columns to check for
915  * duplicate-ness */
916  AttrNumber *dupColIdx; /* their indexes in the target list */
917  Oid *dupOperators; /* equality operators to compare with */
918  AttrNumber flagColIdx; /* where is the flag column, if any */
919  int firstFlag; /* flag value for first input relation */
920  long numGroups; /* estimated number of groups in input */
921 } SetOp;
922 
923 /* ----------------
924  * lock-rows node
925  *
926  * rowMarks identifies the rels to be locked by this node; it should be
927  * a subset of the rowMarks listed in the top-level PlannedStmt.
928  * epqParam is a Param that all scan nodes below this one must depend on.
929  * It is used to force re-evaluation of the plan during EvalPlanQual.
930  * ----------------
931  */
932 typedef struct LockRows
933 {
935  List *rowMarks; /* a list of PlanRowMark's */
936  int epqParam; /* ID of Param for EvalPlanQual re-eval */
937 } LockRows;
938 
939 /* ----------------
940  * limit node
941  *
942  * Note: as of Postgres 8.2, the offset and count expressions are expected
943  * to yield int8, rather than int4 as before.
944  * ----------------
945  */
946 typedef struct Limit
947 {
949  Node *limitOffset; /* OFFSET parameter, or NULL if none */
950  Node *limitCount; /* COUNT parameter, or NULL if none */
951 } Limit;
952 
953 
954 /*
955  * RowMarkType -
956  * enums for types of row-marking operations
957  *
958  * The first four of these values represent different lock strengths that
959  * we can take on tuples according to SELECT FOR [KEY] UPDATE/SHARE requests.
960  * We support these on regular tables, as well as on foreign tables whose FDWs
961  * report support for late locking. For other foreign tables, any locking
962  * that might be done for such requests must happen during the initial row
963  * fetch; their FDWs provide no mechanism for going back to lock a row later.
964  * This means that the semantics will be a bit different than for a local
965  * table; in particular we are likely to lock more rows than would be locked
966  * locally, since remote rows will be locked even if they then fail
967  * locally-checked restriction or join quals. However, the prospect of
968  * doing a separate remote query to lock each selected row is usually pretty
969  * unappealing, so early locking remains a credible design choice for FDWs.
970  *
971  * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we have to uniquely
972  * identify all the source rows, not only those from the target relations, so
973  * that we can perform EvalPlanQual rechecking at need. For plain tables we
974  * can just fetch the TID, much as for a target relation; this case is
975  * represented by ROW_MARK_REFERENCE. Otherwise (for example for VALUES or
976  * FUNCTION scans) we have to copy the whole row value. ROW_MARK_COPY is
977  * pretty inefficient, since most of the time we'll never need the data; but
978  * fortunately the overhead is usually not performance-critical in practice.
979  * By default we use ROW_MARK_COPY for foreign tables, but if the FDW has
980  * a concept of rowid it can request to use ROW_MARK_REFERENCE instead.
981  * (Again, this probably doesn't make sense if a physical remote fetch is
982  * needed, but for FDWs that map to local storage it might be credible.)
983  */
984 typedef enum RowMarkType
985 {
986  ROW_MARK_EXCLUSIVE, /* obtain exclusive tuple lock */
987  ROW_MARK_NOKEYEXCLUSIVE, /* obtain no-key exclusive tuple lock */
988  ROW_MARK_SHARE, /* obtain shared tuple lock */
989  ROW_MARK_KEYSHARE, /* obtain keyshare tuple lock */
990  ROW_MARK_REFERENCE, /* just fetch the TID, don't lock it */
991  ROW_MARK_COPY /* physically copy the row value */
992 } RowMarkType;
993 
994 #define RowMarkRequiresRowShareLock(marktype) ((marktype) <= ROW_MARK_KEYSHARE)
995 
996 /*
997  * PlanRowMark -
998  * plan-time representation of FOR [KEY] UPDATE/SHARE clauses
999  *
1000  * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we create a separate
1001  * PlanRowMark node for each non-target relation in the query. Relations that
1002  * are not specified as FOR UPDATE/SHARE are marked ROW_MARK_REFERENCE (if
1003  * regular tables or supported foreign tables) or ROW_MARK_COPY (if not).
1004  *
1005  * Initially all PlanRowMarks have rti == prti and isParent == false.
1006  * When the planner discovers that a relation is the root of an inheritance
1007  * tree, it sets isParent true, and adds an additional PlanRowMark to the
1008  * list for each child relation (including the target rel itself in its role
1009  * as a child). isParent is also set to true for the partitioned child
1010  * relations, which are not scanned just like the root parent. The child
1011  * entries have rti == child rel's RT index and prti == parent's RT index,
1012  * and can therefore be recognized as children by the fact that prti != rti.
1013  * The parent's allMarkTypes field gets the OR of (1<<markType) across all
1014  * its children (this definition allows children to use different markTypes).
1015  *
1016  * The planner also adds resjunk output columns to the plan that carry
1017  * information sufficient to identify the locked or fetched rows. When
1018  * markType != ROW_MARK_COPY, these columns are named
1019  * tableoid%u OID of table
1020  * ctid%u TID of row
1021  * The tableoid column is only present for an inheritance hierarchy.
1022  * When markType == ROW_MARK_COPY, there is instead a single column named
1023  * wholerow%u whole-row value of relation
1024  * (An inheritance hierarchy could have all three resjunk output columns,
1025  * if some children use a different markType than others.)
1026  * In all three cases, %u represents the rowmark ID number (rowmarkId).
1027  * This number is unique within a plan tree, except that child relation
1028  * entries copy their parent's rowmarkId. (Assigning unique numbers
1029  * means we needn't renumber rowmarkIds when flattening subqueries, which
1030  * would require finding and renaming the resjunk columns as well.)
1031  * Note this means that all tables in an inheritance hierarchy share the
1032  * same resjunk column names. However, in an inherited UPDATE/DELETE the
1033  * columns could have different physical column numbers in each subplan.
1034  */
1035 typedef struct PlanRowMark
1036 {
1038  Index rti; /* range table index of markable relation */
1039  Index prti; /* range table index of parent relation */
1040  Index rowmarkId; /* unique identifier for resjunk columns */
1041  RowMarkType markType; /* see enum above */
1042  int allMarkTypes; /* OR of (1<<markType) for all children */
1043  LockClauseStrength strength; /* LockingClause's strength, or LCS_NONE */
1044  LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED options */
1045  bool isParent; /* true if this is a "dummy" parent entry */
1046 } PlanRowMark;
1047 
1048 
1049 /*
1050  * Plan invalidation info
1051  *
1052  * We track the objects on which a PlannedStmt depends in two ways:
1053  * relations are recorded as a simple list of OIDs, and everything else
1054  * is represented as a list of PlanInvalItems. A PlanInvalItem is designed
1055  * to be used with the syscache invalidation mechanism, so it identifies a
1056  * system catalog entry by cache ID and hash value.
1057  */
1058 typedef struct PlanInvalItem
1059 {
1061  int cacheId; /* a syscache ID, see utils/syscache.h */
1062  uint32 hashValue; /* hash value of object's cache lookup key */
1063 } PlanInvalItem;
1064 
1065 #endif /* PLANNODES_H */
int numCols
Definition: plannodes.h:841
struct BitmapAnd BitmapAnd
double rows_total
Definition: plannodes.h:902
Oid skewTable
Definition: plannodes.h:898
bool dependsOnRole
Definition: plannodes.h:57
List * bitmapplans
Definition: plannodes.h:317
int ordNumCols
Definition: plannodes.h:820
List * paramExecTypes
Definition: plannodes.h:94
struct NestLoopParam NestLoopParam
Plan plan
Definition: plannodes.h:192
int numCols
Definition: plannodes.h:799
List * qual
Definition: plannodes.h:147
List * arbiterIndexes
Definition: plannodes.h:236
double plan_rows
Definition: plannodes.h:133
ScanDirection indexorderdir
Definition: plannodes.h:409
SetOpStrategy strategy
Definition: plannodes.h:913
Plan plan
Definition: plannodes.h:342
bool skewInherit
Definition: plannodes.h:900
Bitmapset * fdwDirectModifyPlans
Definition: plannodes.h:232
Bitmapset * initParam
Definition: plannodes.h:883
SetOpCmd cmd
Definition: plannodes.h:912
Plan plan
Definition: plannodes.h:948
Index nominalRelation
Definition: plannodes.h:221
RowMarkType markType
Definition: plannodes.h:1041
Oid * collations
Definition: plannodes.h:881
struct Sort Sort
Index scanrelid
Definition: plannodes.h:343
AttrNumber * grpColIdx
Definition: plannodes.h:800
List * nestParams
Definition: plannodes.h:700
struct ModifyTable ModifyTable
Oid fs_server
Definition: plannodes.h:613
Plan plan
Definition: plannodes.h:934
struct SubqueryScan SubqueryScan
Oid inRangeColl
Definition: plannodes.h:829
List * nonleafResultRelations
Definition: plannodes.h:74
long numGroups
Definition: plannodes.h:920
Plan plan
Definition: plannodes.h:758
List * withCheckOptionLists
Definition: plannodes.h:229
Oid * collations
Definition: plannodes.h:282
List * functions
Definition: plannodes.h:522
AttrNumber * sortColIdx
Definition: plannodes.h:879
int resultRelIndex
Definition: plannodes.h:226
struct BitmapHeapScan BitmapHeapScan
List * hashclauses
Definition: plannodes.h:740
List * relationOids
Definition: plannodes.h:90
List * indexqual
Definition: plannodes.h:461
List * fdw_exprs
Definition: plannodes.h:614
struct Hash Hash
AttrNumber * ordColIdx
Definition: plannodes.h:821
List * tidquals
Definition: plannodes.h:490
TableFunc * tablefunc
Definition: plannodes.h:543
List * fdw_private
Definition: plannodes.h:615
struct FunctionScan FunctionScan
int plan_node_id
Definition: plannodes.h:145
List * indexqualorig
Definition: plannodes.h:405
NodeTag type
Definition: plannodes.h:705
struct TableSampleClause * tablesample
Definition: plannodes.h:360
NodeTag type
Definition: plannodes.h:1037
struct Limit Limit
bool partColsUpdated
Definition: plannodes.h:224
bool * nullsFirst
Definition: plannodes.h:882
Definition: nodes.h:517
List * custom_exprs
Definition: plannodes.h:643
struct HashJoin HashJoin
bool * nullsFirst
Definition: plannodes.h:763
Index prti
Definition: plannodes.h:1039
int epqParam
Definition: plannodes.h:936
AttrNumber * dupColIdx
Definition: plannodes.h:916
bool canSetTag
Definition: plannodes.h:220
struct Scan Scan
List * values_lists
Definition: plannodes.h:533
List * fdw_scan_tlist
Definition: plannodes.h:616
struct Join Join
struct Append Append
unsigned int Oid
Definition: postgres_ext.h:31
NodeTag
Definition: nodes.h:26
struct Gather Gather
Definition: primnodes.h:164
Index rowmarkId
Definition: plannodes.h:1040
LockWaitPolicy waitPolicy
Definition: plannodes.h:1044
Scan scan
Definition: plannodes.h:532
List * custom_plans
Definition: plannodes.h:642
bool transientPlan
Definition: plannodes.h:55
Node * limitOffset
Definition: plannodes.h:949
struct IndexOnlyScan IndexOnlyScan
int numCols
Definition: plannodes.h:914
SetOpStrategy
Definition: nodes.h:795
int stmt_len
Definition: plannodes.h:100
Oid * ordOperators
Definition: plannodes.h:822
CmdType operation
Definition: plannodes.h:612
List * plans
Definition: plannodes.h:228
Join join
Definition: plannodes.h:739
Oid * sortOperators
Definition: plannodes.h:761
NodeTag type
Definition: plannodes.h:122
Oid indexid
Definition: plannodes.h:403
struct Agg Agg
Oid endInRangeFunc
Definition: plannodes.h:828
struct CteScan CteScan
List * onConflictSet
Definition: plannodes.h:237
struct Plan * planTree
Definition: plannodes.h:63
int rootResultRelIndex
Definition: plannodes.h:227
JoinType
Definition: nodes.h:681
List * invalItems
Definition: plannodes.h:92
struct WindowAgg WindowAgg
struct WorkTableScan WorkTableScan
List * resultRelations
Definition: plannodes.h:225
List * mergeclauses
Definition: plannodes.h:725
struct BitmapIndexScan BitmapIndexScan
struct NestLoop NestLoop
Oid * uniqOperators
Definition: plannodes.h:843
List * appendplans
Definition: plannodes.h:253
struct IndexScan IndexScan
Node * startOffset
Definition: plannodes.h:824
JoinType jointype
Definition: plannodes.h:681
struct ForeignScan ForeignScan
Node * resconstantqual
Definition: plannodes.h:193
List * rowMarks
Definition: plannodes.h:233
struct Plan * righttree
Definition: plannodes.h:149
AggStrategy aggstrategy
Definition: plannodes.h:797
Var * paramval
Definition: plannodes.h:707
bool skip_mark_restore
Definition: plannodes.h:724
Join join
Definition: plannodes.h:699
int cteParam
Definition: plannodes.h:554
List * custom_private
Definition: plannodes.h:644
List * indexorderbyorig
Definition: plannodes.h:407
Plan plan
Definition: plannodes.h:859
AttrNumber flagColIdx
Definition: plannodes.h:918
bool single_copy
Definition: plannodes.h:862
Scan scan
Definition: plannodes.h:358
Scan scan
Definition: plannodes.h:552
Node * limitCount
Definition: plannodes.h:950
Scan scan
Definition: plannodes.h:402
Oid * dupOperators
Definition: plannodes.h:917
int first_partial_plan
Definition: plannodes.h:259
AttrNumber * dupColIdx
Definition: plannodes.h:301
List * partitioned_rels
Definition: plannodes.h:276
struct PlanRowMark PlanRowMark
struct GatherMerge GatherMerge
struct Result Result
int stmt_location
Definition: plannodes.h:99
Bitmapset * aggParams
Definition: plannodes.h:803
int ctePlanId
Definition: plannodes.h:553
Cost startup_cost
Definition: plannodes.h:127
struct Material Material
bool hasReturning
Definition: plannodes.h:49
AttrNumber skewColumn
Definition: plannodes.h:899
Node * endOffset
Definition: plannodes.h:825
struct MergeJoin MergeJoin
List * fdwPrivLists
Definition: plannodes.h:231
ScanDirection
Definition: sdir.h:22
const struct CustomScanMethods * methods
Definition: plannodes.h:647
List * rootResultRelations
Definition: plannodes.h:81
Node * utilityStmt
Definition: plannodes.h:96
struct TableFuncScan TableFuncScan
bool parallel_aware
Definition: plannodes.h:139
int allMarkTypes
Definition: plannodes.h:1042
unsigned int uint32
Definition: c.h:325
bool isshared
Definition: plannodes.h:331
ScanDirection indexorderdir
Definition: plannodes.h:436
int partNumCols
Definition: plannodes.h:817
struct ValuesScan ValuesScan
int jitFlags
Definition: plannodes.h:61
Bitmapset * allParam
Definition: plannodes.h:165
List * fdw_recheck_quals
Definition: plannodes.h:617
struct LockRows LockRows
int numCols
Definition: plannodes.h:775
List * partitioned_rels
Definition: plannodes.h:223
struct ProjectSet ProjectSet
struct SetOp SetOp
List * partitioned_rels
Definition: plannodes.h:252
List * indexqual
Definition: plannodes.h:404
List * bitmapqualorig
Definition: plannodes.h:477
NodeTag type
Definition: plannodes.h:43
Plan plan
Definition: plannodes.h:330
AttrNumber * uniqColIdx
Definition: plannodes.h:842
Oid * sortOperators
Definition: plannodes.h:880
bool inRangeAsc
Definition: plannodes.h:830
Plan plan
Definition: plannodes.h:911
int numCols
Definition: plannodes.h:759
Plan plan
Definition: plannodes.h:796
List * part_prune_infos
Definition: plannodes.h:264
Scan scan
Definition: plannodes.h:639
List * bitmapplans
Definition: plannodes.h:332
Plan plan
Definition: plannodes.h:749
bool canSetTag
Definition: plannodes.h:53
LockClauseStrength
Definition: lockoptions.h:21
CmdType commandType
Definition: plannodes.h:45
Plan plan
Definition: plannodes.h:840
Scan SeqScan
Definition: plannodes.h:350
NodeTag type
Definition: plannodes.h:1060
Oid * mergeFamilies
Definition: plannodes.h:727
Oid * mergeCollations
Definition: plannodes.h:728
List * groupingSets
Definition: plannodes.h:805
unsigned int Index
Definition: c.h:442
AttrNumber * partColIdx
Definition: plannodes.h:818
List * rowMarks
Definition: plannodes.h:88
uint32 hashValue
Definition: plannodes.h:1062
int num_workers
Definition: plannodes.h:860
List * indextlist
Definition: plannodes.h:435
List * indexorderby
Definition: plannodes.h:434
int firstFlag
Definition: plannodes.h:919
Oid * partOperators
Definition: plannodes.h:819
bool * mergeNullsFirst
Definition: plannodes.h:730
List * indexorderby
Definition: plannodes.h:406
List * subplans
Definition: plannodes.h:83
int plan_width
Definition: plannodes.h:134
bool funcordinality
Definition: plannodes.h:523
int * mergeStrategies
Definition: plannodes.h:729
Index winref
Definition: plannodes.h:816
Bitmapset * rewindPlanIDs
Definition: plannodes.h:86
AggSplit aggsplit
Definition: plannodes.h:798
List * custom_scan_tlist
Definition: plannodes.h:645
struct PlannedStmt PlannedStmt
bool hasModifyingCTE
Definition: plannodes.h:51
Plan plan
Definition: plannodes.h:774
OnConflictAction onConflictAction
Definition: plannodes.h:235
List * rowMarks
Definition: plannodes.h:935
bool inRangeNullsFirst
Definition: plannodes.h:831
AttrNumber * sortColIdx
Definition: plannodes.h:280
Scan scan
Definition: plannodes.h:489
struct Unique Unique
struct CustomScan CustomScan
LockClauseStrength strength
Definition: plannodes.h:1043
int rescan_param
Definition: plannodes.h:861
AggSplit
Definition: nodes.h:765
struct TidScan TidScan
long numGroups
Definition: plannodes.h:802
RowMarkType
Definition: plannodes.h:984
List * indexqual
Definition: plannodes.h:433
Oid * dupOperators
Definition: plannodes.h:302
struct BitmapOr BitmapOr
Bitmapset * extParam
Definition: plannodes.h:164
struct MergeAppend MergeAppend
List * rtable
Definition: plannodes.h:65
struct Plan * lefttree
Definition: plannodes.h:148
Bitmapset * custom_relids
Definition: plannodes.h:646
struct PlanInvalItem PlanInvalItem
List * indexorderbyops
Definition: plannodes.h:408
List * indexqualorig
Definition: plannodes.h:462
List * targetlist
Definition: plannodes.h:146
bool * nullsFirst
Definition: plannodes.h:283
struct RecursiveUnion RecursiveUnion
Bitmapset * initParam
Definition: plannodes.h:864
AttrNumber * sortColIdx
Definition: plannodes.h:760
bool invisible
Definition: plannodes.h:863
Oid startInRangeFunc
Definition: plannodes.h:827
struct NamedTuplestoreScan NamedTuplestoreScan
List * mergeplans
Definition: plannodes.h:277
int num_workers
Definition: plannodes.h:875
AggStrategy
Definition: nodes.h:743
Plan plan
Definition: plannodes.h:897
Oid * grpOperators
Definition: plannodes.h:801
uint64 queryId
Definition: plannodes.h:47
CmdType operation
Definition: plannodes.h:219
Join join
Definition: plannodes.h:723
List * chain
Definition: plannodes.h:806
SetOpCmd
Definition: nodes.h:787
List * resultRelations
Definition: plannodes.h:68
struct SampleScan SampleScan
bool parallelModeNeeded
Definition: plannodes.h:59
List * initPlan
Definition: plannodes.h:150
Plan plan
Definition: plannodes.h:815
AttrNumber * grpColIdx
Definition: plannodes.h:776
Cost total_cost
Definition: plannodes.h:128
struct Plan Plan
struct Group Group
List * returningLists
Definition: plannodes.h:230
bool parallel_safe
Definition: plannodes.h:140
bool isParent
Definition: plannodes.h:1045
Oid * sortOperators
Definition: plannodes.h:281
Plan plan
Definition: plannodes.h:316
Definition: plannodes.h:794
bool inner_unique
Definition: plannodes.h:682
int frameOptions
Definition: plannodes.h:823
int rescan_param
Definition: plannodes.h:876
Index exclRelRTI
Definition: plannodes.h:239
Oid * collations
Definition: plannodes.h:762
Definition: pg_list.h:45
OnConflictAction
Definition: nodes.h:807
int16 AttrNumber
Definition: attnum.h:21
Oid * grpOperators
Definition: plannodes.h:777
LockWaitPolicy
Definition: lockoptions.h:36
CmdType
Definition: nodes.h:657
List * joinqual
Definition: plannodes.h:683
List * exclRelTlist
Definition: plannodes.h:240
double Cost
Definition: nodes.h:648
Plan * subplan
Definition: plannodes.h:512
Plan plan
Definition: plannodes.h:250
int epqParam
Definition: plannodes.h:234
bool fsSystemCol
Definition: plannodes.h:619
Node * onConflictWhere
Definition: plannodes.h:238
Bitmapset * fs_relids
Definition: plannodes.h:618
Plan plan
Definition: plannodes.h:680
uint32 flags
Definition: plannodes.h:640
Plan plan
Definition: plannodes.h:204