Skip to content

Commit 3fdc374

Browse files
author
Etsuro Fujita
committed
Save PathTargets for distinct/ordered relations in root->upper_targets[].
For the convenience of extensions, we previously only saved PathTargets for grouped, window, and final relations in root->upper_targets[] in grouping_planner(). To improve the convenience, save PathTargets for distinct and ordered relations as well. Author: Antonin Houska, with an additional change by me Discussion: https://postgr.es/m/10994.1549559088@localhost
1 parent a916bdc commit 3fdc374

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,6 +2035,8 @@ grouping_planner(PlannerInfo *root, bool inheritance_update,
20352035
* of the corresponding upperrels might not be needed for this query.
20362036
*/
20372037
root->upper_targets[UPPERREL_FINAL] = final_target;
2038+
root->upper_targets[UPPERREL_ORDERED] = final_target;
2039+
root->upper_targets[UPPERREL_DISTINCT] = sort_input_target;
20382040
root->upper_targets[UPPERREL_WINDOW] = sort_input_target;
20392041
root->upper_targets[UPPERREL_GROUP_AGG] = grouping_target;
20402042

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy