diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-06-06 13:41:34 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-06-06 13:41:34 +0300 |
commit | 199012a3d844c6283e0ab4b1139440840a91433d (patch) | |
tree | 8293d986f3ae2c0259e30bcbfc328d2d697660ae /contrib/postgres_fdw/postgres_fdw.c | |
parent | f654f000ddfd2c8724d0d7085087424f6ab51515 (diff) | |
download | postgresql-199012a3d844c6283e0ab4b1139440840a91433d.tar.gz postgresql-199012a3d844c6283e0ab4b1139440840a91433d.zip |
Fix asymmetry in setting EquivalenceClass.ec_sortref
0452b461bc made get_eclass_for_sort_expr() always set
EquivalenceClass.ec_sortref if it's not done yet. This leads to an asymmetric
situation when whoever first looks for the EquivalenceClass sets the
ec_sortref. It is also counterintuitive that get_eclass_for_sort_expr()
performs modification of data structures.
This commit makes make_pathkeys_for_sortclauses_extended() responsible for
setting EquivalenceClass.ec_sortref. Now we set the
EquivalenceClass.ec_sortref's needed to explore alternative GROUP BY ordering
specifically during building pathkeys by the list of grouping clauses.
Discussion: https://postgr.es/m/17037754-f187-4138-8285-0e2bfebd0dea%40postgrespro.ru
Reported-by: Tom Lane
Author: Andrei Lepikhov
Reviewed-by: Alexander Korotkov, Pavel Borisov
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions