On Sun, Dec 18, 2022 at 8:30 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > I'm not especially on board with "ALL" meaning "ALL (oh, but not > aggregates)".
Yes, that's the weak part of the proposal. I even thought about renaming it to "GROUP BY SOMEHOW" or even "GROUP BY SURPRISE ME". I mean I see some cases when it's useful and much less cases when it's dangerously ambiguous. E.g. grouping by result of a subquery looks way too complex and unpredictable. But with simple Vars... what could go wrong? Best regards, Andrey Borodin.