diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2021-08-08 16:55:51 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2021-08-08 18:46:34 +0200 |
commit | 18fea737b5e47cc677eaf97365c765a47f346763 (patch) | |
tree | 4fd080fd87748c9f8505ff048cf36d67a1028f33 /src/backend/optimizer/plan/createplan.c | |
parent | 2226b4189bb4ccfcc53917a8695d24e91ff2f950 (diff) | |
download | postgresql-18fea737b5e47cc677eaf97365c765a47f346763.tar.gz postgresql-18fea737b5e47cc677eaf97365c765a47f346763.zip |
Change NestPath node to contain JoinPath node
This makes the structure of all JoinPath-derived nodes the same,
independent of whether they have additional fields.
Discussion: https://www.postgresql.org/message-id/flat/c1097590-a6a4-486a-64b1-e1f9cc0533ce@enterprisedb.com
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 0738d7055c9..a5f6d678ccd 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -4221,8 +4221,8 @@ create_nestloop_plan(PlannerInfo *root, NestLoop *join_plan; Plan *outer_plan; Plan *inner_plan; - List *tlist = build_path_tlist(root, &best_path->path); - List *joinrestrictclauses = best_path->joinrestrictinfo; + List *tlist = build_path_tlist(root, &best_path->jpath.path); + List *joinrestrictclauses = best_path->jpath.joinrestrictinfo; List *joinclauses; List *otherclauses; Relids outerrelids; @@ -4230,13 +4230,13 @@ create_nestloop_plan(PlannerInfo *root, Relids saveOuterRels = root->curOuterRels; /* NestLoop can project, so no need to be picky about child tlists */ - outer_plan = create_plan_recurse(root, best_path->outerjoinpath, 0); + outer_plan = create_plan_recurse(root, best_path->jpath.outerjoinpath, 0); /* For a nestloop, include outer relids in curOuterRels for inner side */ root->curOuterRels = bms_union(root->curOuterRels, - best_path->outerjoinpath->parent->relids); + best_path->jpath.outerjoinpath->parent->relids); - inner_plan = create_plan_recurse(root, best_path->innerjoinpath, 0); + inner_plan = create_plan_recurse(root, best_path->jpath.innerjoinpath, 0); /* Restore curOuterRels */ bms_free(root->curOuterRels); @@ -4247,10 +4247,10 @@ create_nestloop_plan(PlannerInfo *root, /* Get the join qual clauses (in plain expression form) */ /* Any pseudoconstant clauses are ignored here */ - if (IS_OUTER_JOIN(best_path->jointype)) + if (IS_OUTER_JOIN(best_path->jpath.jointype)) { extract_actual_join_clauses(joinrestrictclauses, - best_path->path.parent->relids, + best_path->jpath.path.parent->relids, &joinclauses, &otherclauses); } else @@ -4261,7 +4261,7 @@ create_nestloop_plan(PlannerInfo *root, } /* Replace any outer-relation variables with nestloop params */ - if (best_path->path.param_info) + if (best_path->jpath.path.param_info) { joinclauses = (List *) replace_nestloop_params(root, (Node *) joinclauses); @@ -4273,7 +4273,7 @@ create_nestloop_plan(PlannerInfo *root, * Identify any nestloop parameters that should be supplied by this join * node, and remove them from root->curOuterParams. */ - outerrelids = best_path->outerjoinpath->parent->relids; + outerrelids = best_path->jpath.outerjoinpath->parent->relids; nestParams = identify_current_nestloop_params(root, outerrelids); join_plan = make_nestloop(tlist, @@ -4282,10 +4282,10 @@ create_nestloop_plan(PlannerInfo *root, nestParams, outer_plan, inner_plan, - best_path->jointype, - best_path->inner_unique); + best_path->jpath.jointype, + best_path->jpath.inner_unique); - copy_generic_path_info(&join_plan->join.plan, &best_path->path); + copy_generic_path_info(&join_plan->join.plan, &best_path->jpath.path); return join_plan; } |