Commit 61fd2189 authored by Tom Lane's avatar Tom Lane

Fix minor thinko in pathification code.

I passed the wrong "root" struct to create_pathtarget in build_minmax_path.
Since the subroot is a clone of the outer root, this would not cause any
serious problems, but it would waste some cycles because
set_pathtarget_cost_width would not have access to Var width estimates
set up while running query_planner on the subroot.
parent e66197fa
...@@ -465,7 +465,7 @@ build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo, ...@@ -465,7 +465,7 @@ build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
* cheapest path.) * cheapest path.)
*/ */
sorted_path = apply_projection_to_path(subroot, final_rel, sorted_path, sorted_path = apply_projection_to_path(subroot, final_rel, sorted_path,
create_pathtarget(root, tlist)); create_pathtarget(subroot, tlist));
/* /*
* Determine cost to get just the first row of the presorted path. * Determine cost to get just the first row of the presorted path.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment