Save PathTargets for distinct/ordered relations in root->upper_targets[].
authorEtsuro Fujita <efujita@postgresql.org>
Mon, 18 Feb 2019 07:13:46 +0000 (16:13 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Mon, 18 Feb 2019 07:13:46 +0000 (16:13 +0900)
commit3fdc374b5d24b08119a91555ca2fae427af0b085
treeb1f02ba2284dc1074300b253a5be87ce25c1e06d
parenta916bdc496a9d3fde48ca7c72478e7e4aecc5597
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
src/backend/optimizer/plan/planner.c