Re: GROUP BY ALL

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: GROUP BY ALL
Дата
Msg-id Y7iY+9tHYpvt4HYy@momjian.us
обсуждение исходный текст
Ответ на Re: GROUP BY ALL  (Vik Fearing <vik@postgresfriends.org>)
Ответы Re: GROUP BY ALL
Список pgsql-hackers
On Mon, Dec 19, 2022 at 05:53:46PM +0100, Vik Fearing wrote:
> I think this is a pretty terrible idea.  If we want that kind of behavior,
> we should just allow the GROUP BY to be omitted since without grouping sets,
> it is kind of redundant anyway.
> 
> I don't know what my opinion is on that.

This is a very interesting concept.  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.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

Embrace your flaws.  They make you human, rather than perfect,
which you will never be.



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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: RFC: logical publication via inheritance root?
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Using WaitEventSet in the postmaster