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