Re: behavior of GROUP BY with VOLATILE expressions

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: behavior of GROUP BY with VOLATILE expressions
Дата
Msg-id CAKFQuwZ=Rwp_1kay=RF1txrMM+87Rz5o34aS5n7dPf=u9UW0Mg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: behavior of GROUP BY with VOLATILE expressions  (Paul George <p.a.george19@gmail.com>)
Ответы Re: behavior of GROUP BY with VOLATILE expressions
Список pgsql-hackers
On Fri, Jul 19, 2024 at 2:21 PM Paul George <p.a.george19@gmail.com> wrote:
Great, thanks for the links and useful past discussions! I figured I wasn't the first to stumble across this, and it's interesting to see the issue arise with ORDER BY [VOLATILE FUNC] as well.

My question was not so much about changing behavior as it was about understanding what is desired, especially in light of the fact that subqueries behave differently. From my reading of the links you provided, it seems that even the notion of "desired" here is itself dubious and that there is a case for reevaluating RANDOM() everywhere and a case for not doing that. Given this murkiness, is it fair then to say that drawing parallels between how GROUP BY subquery is handled is moot?

Only now just grasping that you are trying to group something that is definitionally random.  That just doesn't make sense to me.  Grouping is for categorical data (loosely defined, something like Invoice# arguably counts as a category if you are looking at invoice details.)

I'll stick with: this whole area, implementation-wise, is going to remain status-quo.  If you've got ideas for documenting it better hopefully a patch goes in at some point.  Mostly that can be done black-box style - inputs and outputs, not code reading.

David J.

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Statistics Import and Export
Следующее
От: Julien Tachoires
Дата:
Сообщение: Re: Compress ReorderBuffer spill files using LZ4