Re: FILTER clause for non-aggregate window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Андрей Жиденков <pensnarik(at)gmail(dot)com>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: FILTER clause for non-aggregate window functions
Date: 2017-12-12 15:35:05
Message-ID: 32701.1513092905@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?UTF-8?B?0JDQvdC00YDQtdC5INCW0LjQtNC10L3QutC+0LI=?= <pensnarik(at)gmail(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Андрей Жиденков 2017-12-12 16:53:01 Re: FILTER clause for non-aggregate window functions
Previous Message Андрей Жиденков 2017-12-12 07:54:14 FILTER clause for non-aggregate window functions