Content-Length: 259499 | pFad | http://github.com/postgrespro/postgres_cluster/commit/3fdc374b5d24b08119a91555ca2fae427af0b085

0F Save PathTargets for distinct/ordered relations in root->upper_target… · postgrespro/postgres_cluster@3fdc374 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/3fdc374b5d24b08119a91555ca2fae427af0b085

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy