Re: FILTER clause for non-aggregate window functions

Поиск
Список
Период
Сортировка
От Андрей Жиденков
Тема Re: FILTER clause for non-aggregate window functions
Дата
Msg-id CAN=gQ4Aa5i16eWC_UgsPswpMBsVy6Pshvmq76E=Y4gk98OLg8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FILTER clause for non-aggregate window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I could not put the restrictions in WHERE because I want them to be applied only to the window frame, not to all selected rows.

On 12 Dec. 2017 18:35, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
\xC1\xBA\xFFАндрей Жидем\xAF\xFDков <pensnarik@gmail.com> writes:
> Why FILTER is not implemented for non-aggregate functions?

The SQL standard only describes FILTER for aggregates.  I'm not sure
offhand whether it'd be semantically sensible for window functions.
In any case, seems like most of the cases where you'd want it can be
expressed equally well by putting the restriction into WHERE.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: FILTER clause for non-aggregate window functions
Следующее
От: Abdul Hameedk
Дата:
Сообщение: XML Parsing in Postgresql