Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>,
Dean Rasheed <dean.a.rasheed@gmail.com>,
Ronan Dunklau <ronan.dunklau@aiven.io>,
Justin Pryzby <pryzby@telsasoft.com>,
Pavel Luzanov <p.luzanov@postgrespro.ru>,
pgsql-hackers@lists.postgresql.org,
Ranier Vilela <ranier.vf@gmail.com>
Date: 2023-01-17T07:05:19Z
Lists: pgsql-hackers
Richard Guo <guofenglinux@gmail.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
Commits
-
Don't presort ORDER BY/DISTINCT Aggrefs with volatile functions
- da5800d5fa63 16.0 landed
-
Add enable_presorted_aggregate GUC
- 3226f47282a0 16.0 landed
-
Remove pessimistic cost penalization from Incremental Sort
- 4a29eabd1d91 16.0 landed
-
Fix hypothetical problem passing the wrong GROUP BY pathkeys
- af7d270dd3c7 16.0 landed
-
Remove unused fields from ExprEvalStep
- 9fc1776dda9f 16.0 landed
-
Improve performance of ORDER BY / DISTINCT aggregates
- 1349d2790bf4 16.0 landed
-
Refactor function parse_subscription_options.
- 8aafb0261675 15.0 cited