Re: GROUP BY ALL

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: GROUP BY ALL
Дата
Msg-id CAKFQuwZQojxzMf3LYiNOO0dexn030tveM2K2_Qi8b0tud_CM2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GROUP BY ALL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sunday, December 18, 2022, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andrey Borodin <amborodin86@gmail.com> writes:
> I saw a thread in a social network[0] about GROUP BY ALL. The idea seems useful.

Isn't that just a nonstandard spelling of SELECT DISTINCT?

What would happen if there are aggregate functions in the tlist?
I'm not especially on board with "ALL" meaning "ALL (oh, but not
aggregates)".


IIUC some systems treat any non-aggregated column as an implicit group by column.  This proposal is an explicit way to enable that implicit behavior in PostgreSQL.  It is, as you note, an odd meaning for the word ALL.

We tend to not accept non-standard usability syntax extensions even if others systems implement them.  I don’t see this one ending up being an exception…

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrey Borodin
Дата:
Сообщение: Re: GROUP BY ALL
Следующее
От: Michael Paquier
Дата:
Сообщение: Simplifications for error messages related to compression