Re: Proposal: QUALIFY clause

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Proposal: QUALIFY clause
Date: 2025-07-22 18:11:11
Message-ID: CAB-JLwboVrNVRPD4CC1bJhgJQB50wcUn-NWkfgEpfXsmby1spg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em ter., 22 de jul. de 2025 às 08:56, Matheus Alcantara <
matheusssilv97(at)gmail(dot)com> escreveu:

> The current patch supports the following syntaxes:
> SELECT a, b, c
> wf() OVER () as d
> FROM tab
> QUALIFY d = 1
> When using the "QUALIFY d = 1" form, I currently rewrite the expression
> as "wf() OVER () = 1" by searching the targetlist for the matching
> alias, replacing the Var with the corresponding WindowFunc.
>

Not related to $subject but that way you did,
that replacement alias for wf expression, is cool.
With that would it be possible to have where replacements too ? Maybe.

select a+b as ab from t where ab = 5

regards
Marcos

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-07-22 18:15:16 Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX
Previous Message Peter Geoghegan 2025-07-22 17:50:16 Re: index prefetching