pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@postgresfriends.org>
To: Matheus Alcantara <matheusssilv97@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter@eisentraut.org>
Subject: Re: Proposal: QUALIFY clause
Date: Mon, 21 Jul 2025 22:23:32 +0200
Message-ID: <a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org> (raw)
In-Reply-To: <CAFY6G8euMWRjTEdRV9M=RL2_EJNDm5UNeHat9U1FGGwzfjGSfw@mail.gmail.com>
References: <CAFY6G8euMWRjTEdRV9M=RL2_EJNDm5UNeHat9U1FGGwzfjGSfw@mail.gmail.com>


On 21/07/2025 14:47, Matheus Alcantara wrote:
> Hi all,
>
> I'm sending a proof-of-concept patch to add support for the QUALIFY
> clause in Postgres. This feature allows filtering rows after window
> functions are computed, using a syntax similar to the WHERE or HAVING
> clauses.


I took a very brief look at this, and I think your grammar is wrong.  
The QUALIFY clause should go after the WINDOW clause, just like 
FROM/WHERE and GROUP BY/HAVING.


That is what I am proposing to the standards committee, and I already 
have some buy-in for that.

-- 

Vik Fearing






view thread (41+ messages)  latest in thread

Message-ID: <a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org>
Permalink:  ../a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org/
Also on:    postgresql.org/message-id/a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: vik@postgresfriends.org, matheusssilv97@gmail.com, peter@eisentraut.org
  Subject: Re: Proposal: QUALIFY clause
  In-Reply-To: <a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org>
  References: <CAFY6G8euMWRjTEdRV9M=RL2_EJNDm5UNeHat9U1FGGwzfjGSfw@mail.gmail.com> <a042f530-90a4-46fc-8595-43053fcfc06e@postgresfriends.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox