Re: Proposal: QUALIFY clause

Vik Fearing <vik@postgresfriends.org>

From: Vik Fearing <vik@postgresfriends.org>
To: Matheus Alcantara <matheusssilv97@gmail.com>, Marcos Pegoraro <marcos@f10.com.br>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter@eisentraut.org>
Date: 2025-07-22T21:21:22Z
Lists: pgsql-hackers
On 22/07/2025 20:54, Matheus Alcantara wrote:
> (this happens on transformQualifyClause() if you want to take a look)


I took a quick look at the patch (without applying and testing it) and 
it seems to me that parse analysis is the wrong place to do this. We 
want ruleutils to be able to spew out the QUALIFY clause as written in a 
view and not as transformed.  If we are going to go down the syntax 
transformation route, that should happen in the rewriter at 
planning/execution time.

-- 

Vik Fearing