Re: Add proper planner support for ORDER BY / DISTINCT aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Ronan Dunklau <ronan(dot)dunklau(at)aiven(dot)io>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Date: 2023-01-17 07:05:19
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> BTW, I wonder if we should have checked CoercionForm before
> fix_upper_expr_mutator steps into CoerceViaIO->arg to adjust the expr
> there.

I will just quote what it says in primnodes.h:

* NB: equal() ignores CoercionForm fields, therefore this *must* not carry
* any semantically significant information.

If you think the planner should act differently for different values of
CoercionForm, you are mistaken. Maybe this is evidence of some
previous bit of brain-fade, but if so we need to fix that.

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-01-17 07:15:37 Re: Removing redundant grouping columns
Previous Message Michael Paquier 2023-01-17 07:01:29 Re: Make use of assign_checkpoint_completion_target() to calculate CheckPointSegments correctly