Re: GROUP BY ALL
| От | Andrey Borodin | 
|---|---|
| Тема | Re: GROUP BY ALL | 
| Дата | |
| Msg-id | CAAhFRxhg7Z-zdjWgisbcBpnZve4qmWd=G6od4_ZutsrD0HJ6fg@mail.gmail.com обсуждение исходный текст | 
| Ответ на | Re: GROUP BY ALL (Bruce Momjian <bruce@momjian.us>) | 
| Список | pgsql-hackers | 
On Fri, Jan 6, 2023 at 1:56 PM Bruce Momjian <bruce@momjian.us> wrote: > Because Postgres requires GROUP BY > of all non-aggregate columns of a target list, Postgres could certainly > automatically generate the GROUP BY. However, readers of the query > might not easily distinguish function calls from aggregates, so in a way > the GROUP BY is for the reader, not for the database server. > How about "SELECT a,b, count(*) FROM t GROUP AUTOMATICALLY;" ? And then a shorthand for "SELECT a,b, count(*) FROM t GROUP;". Anyway, the problem is not in clever syntax, but in the fact that it's an SQL extension, not a standard... Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: