aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-08 16:50:32 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-08 16:50:44 -0500
commit61fd218930db53079e5f001dd4ea2fd53afd1b95 (patch)
treeb781a4096892e847c599cbddd9370f21e6f7ea8b /src
parente66197fa2efa8ae0cab1eed6b2257ab4e2134b1e (diff)
downloadpostgresql-61fd218930db53079e5f001dd4ea2fd53afd1b95.tar.gz
postgresql-61fd218930db53079e5f001dd4ea2fd53afd1b95.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/plan/planagg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c
index 9d6c181e365..cefec7bdf10 100644
--- a/src/backend/optimizer/plan/planagg.c
+++ b/src/backend/optimizer/plan/planagg.c
@@ -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.