1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00

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.
This commit is contained in:
Tom Lane
2016-03-08 16:50:32 -05:00
parent e66197fa2e
commit 61fd218930

View File

@ -465,7 +465,7 @@ build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
* cheapest 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.