mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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
This commit is contained in:
parent
a916bdc496
commit
3fdc374b5d
@ -2035,6 +2035,8 @@ grouping_planner(PlannerInfo *root, bool inheritance_update,
|
|||||||
* of the corresponding upperrels might not be needed for this query.
|
* of the corresponding upperrels might not be needed for this query.
|
||||||
*/
|
*/
|
||||||
root->upper_targets[UPPERREL_FINAL] = final_target;
|
root->upper_targets[UPPERREL_FINAL] = final_target;
|
||||||
|
root->upper_targets[UPPERREL_ORDERED] = final_target;
|
||||||
|
root->upper_targets[UPPERREL_DISTINCT] = sort_input_target;
|
||||||
root->upper_targets[UPPERREL_WINDOW] = sort_input_target;
|
root->upper_targets[UPPERREL_WINDOW] = sort_input_target;
|
||||||
root->upper_targets[UPPERREL_GROUP_AGG] = grouping_target;
|
root->upper_targets[UPPERREL_GROUP_AGG] = grouping_target;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user