Implementation DISTINCT for window aggregate function: SUM

Поиск
Список
Период
Сортировка
От Eugen Konkov
Тема Implementation DISTINCT for window aggregate function: SUM
Дата
Msg-id 1233802865.20200418144655@yandex.ru
обсуждение исходный текст
Ответы Re: Implementation DISTINCT for window aggregate function: SUM
Список pgsql-hackers
Hello PostgreSQL-development,

Oracle has implementation:

select id, amount, sum(DISTINCT amount) over () as total
  from xx;


https://dbfiddle.uk/?rdbms=oracle_18&fiddle=8eeb60183ec9576ddb4b2c9f2874d09f


Why this is not possible in PG?
https://dbfiddle.uk/?rdbms=postgres_12&fiddle=97c05203af4c927ff9f206e164752767


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


-- 
Best regards,
Eugen Konkov




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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: PG compilation error with Visual Studio 2015/2017/2019
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Poll: are people okay with function/operator table redesign?