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