Re: Implementation DISTINCT for window aggregate function: SUM

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Implementation DISTINCT for window aggregate function: SUM
Дата
Msg-id CAApHDvpPqApuv_i_GdZF2wP7LTUugP3OV2WeGW2Yr1uXYjQZrg@mail.gmail.com
обсуждение исходный текст
Ответ на Implementation DISTINCT for window aggregate function: SUM  (Eugen Konkov <kes-kes@yandex.ru>)
Список pgsql-hackers
On Sat, 18 Apr 2020 at 23:47, Eugen Konkov <kes-kes@yandex.ru> wrote:
> select id, amount, sum(DISTINCT amount) over () as total
>   from xx;

> Why this is not possible in PG?

Mainly because nobody has committed anything to implement it yet.

> Why Window-specific functions do not allow DISTINCT to be used within the function argument list.?
> Which problems are exists?

There are some details in [1] which you might be interested in.

David

[1]
https://www.postgresql.org/message-id/flat/CAN1Pwonf4waD%2BPWkEFK8ANLua8fPjZ4DmV%2BhixO62%2BLiR8gwaA%40mail.gmail.com



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Poll: are people okay with function/operator table redesign?