Re: Proposal: QUALIFY clause

From: "Matheus Alcantara" <matheusssilv97(at)gmail(dot)com>
To: "Vik Fearing" <vik(at)postgresfriends(dot)org>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Peter Eisentraut" <peter(at)eisentraut(dot)org>
Subject: Re: Proposal: QUALIFY clause
Date: 2025-07-21 21:29:05
Message-ID: DBI1WKCGAPN4.321XNB6R2YKPT@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon Jul 21, 2025 at 5:23 PM -03, Vik Fearing wrote:
>
> 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.
>
Thank you for the brief review and for the comments!

I'm not sure if I fully understand but please see the new attached
version.

Thanks,

--
Matheus Alcantara

Attachment Content-Type Size
v1-0001-QUALIFY-clause.patch text/plain 21.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-07-21 21:47:31 Re: track generic and custom plans in pg_stat_statements
Previous Message Sami Imseih 2025-07-21 21:23:52 Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX