agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Андрей Жиденков <pensnarik@gmail.com>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: FILTER clause for non-aggregate window functions
Date: Tue, 12 Dec 2017 10:35:05 -0500
Message-ID: <32701.1513092905@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN=gQ4AG_XxuTSq2brj3GY_MK-Qc+KwnETQiMXGmycsgy_Mbhw@mail.gmail.com>
References: <CAN=gQ4AG_XxuTSq2brj3GY_MK-Qc+KwnETQiMXGmycsgy_Mbhw@mail.gmail.com>
=?UTF-8?B?0JDQvdC00YDQtdC5INCW0LjQtNC10L3QutC+0LI=?= <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
view thread (3+ messages) latest in thread
Message-ID: <32701.1513092905@sss.pgh.pa.us>
Permalink: ../32701.1513092905@sss.pgh.pa.us/
Also on: postgresql.org/message-id/32701.1513092905@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, pensnarik@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: FILTER clause for non-aggregate window functions
In-Reply-To: <32701.1513092905@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox