diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/pathnodes.h | 6 | ||||
-rw-r--r-- | src/include/nodes/primnodes.h | 1 | ||||
-rw-r--r-- | src/include/optimizer/planner.h | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index b12a2508d8c..7ee9a7a68d8 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -110,6 +110,9 @@ typedef struct PlannerGlobal /* PlannerInfos for SubPlan nodes */ List *subroots pg_node_attr(read_write_ignore); + /* names already used for subplans (list of C strings) */ + List *subplanNames pg_node_attr(read_write_ignore); + /* indices of subplans that require REWIND */ Bitmapset *rewindPlanIDs; @@ -228,6 +231,9 @@ struct PlannerInfo /* NULL at outermost Query */ PlannerInfo *parent_root pg_node_attr(read_write_ignore); + /* Subplan name for EXPLAIN and debugging purposes (NULL at top level) */ + char *plan_name; + /* * plan_params contains the expressions that this query level needs to * make available to a lower query level that is currently being planned. diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index e9d8bf74145..1b4436f2ff6 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -1108,6 +1108,7 @@ typedef struct SubPlan Oid firstColCollation; /* Collation of first column of subplan * result */ /* Information about execution strategy: */ + bool isInitPlan; /* true if it's an InitPlan */ bool useHashTable; /* true to store subselect output in a hash * table (implies we are doing "IN") */ bool unknownEqFalse; /* true if it's okay to return FALSE when the diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index f220e9a270d..1bbef0018d5 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -43,6 +43,7 @@ extern PlannedStmt *standard_planner(Query *parse, const char *query_string, ParamListInfo boundParams); extern PlannerInfo *subquery_planner(PlannerGlobal *glob, Query *parse, + char *plan_name, PlannerInfo *parent_root, bool hasRecursion, double tuple_fraction, SetOperationStmt *setops); @@ -62,4 +63,7 @@ extern Expr *preprocess_phv_expression(PlannerInfo *root, Expr *expr); extern RelOptInfo *create_unique_paths(PlannerInfo *root, RelOptInfo *rel, SpecialJoinInfo *sjinfo); +extern char *choose_plan_name(PlannerGlobal *glob, const char *name, + bool always_number); + #endif /* PLANNER_H */ |