On Fri, Sep 16, 2022 at 12:22:08PM +1200, David Rowley wrote:
> We'd probably still want to keep preprocess_groupclause() as
> get_useful_group_keys_orderings() is not exhaustive in its search.
This thread has been idle for a few weeks now with a review posted, so
I have marked the patch as RwF.
-
On Wed, 13 Jul 2022 at 05:31, Tom Lane wrote:
> I tried the attached quick-hack patch that just prevents
> remove_useless_groupby_columns from removing anything that
> appears in ORDER BY. That successfully fixes the complained-of
> case, and it doesn't change any existing regression test results
On Wed, Jul 13, 2022 at 1:31 AM Tom Lane wrote:
> I tried the attached quick-hack patch that just prevents
> remove_useless_groupby_columns from removing anything that
> appears in ORDER BY. That successfully fixes the complained-of
> case, and it doesn't change any existing regression test resu
On Wed, 13 Jul 2022 at 05:31, Tom Lane wrote:
> I tried the attached quick-hack patch that just prevents
> remove_useless_groupby_columns from removing anything that
> appears in ORDER BY. That successfully fixes the complained-of
> case, and it doesn't change any existing regression test results
I looked into the complaint at [1] about the planner being much
stupider when one side of a JOIN USING is referenced than the other
side. It seemed to me that that shouldn't be happening, because
the relevant decisions are made on the basis of EquivalenceClasses
and both USING columns should be in