Re: A modest proposal: make parser/rewriter/planner inputs read-only - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: A modest proposal: make parser/rewriter/planner inputs read-only
Date
Msg-id 75a742bc-151e-4286-a2cc-01d0c26c1ffd@gmail.com
Whole thread Raw
In response to Re: A modest proposal: make parser/rewriter/planner inputs read-only  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: A modest proposal: make parser/rewriter/planner inputs read-only
List pgsql-hackers
On 4/15/25 19:34, Tom Lane wrote:
> Andrei Lepikhov <lepihov@gmail.com> writes:
>> But what is the way you are proposing here? Do you mean that one more
>> entity will be explicitly introduced: a transformed parse tree?
> 
> No, I wasn't thinking of adding new concepts, just saying that the
> inputs to certain operations need to be treated as read-only.
> What would you envision a "transformed parse tree" being that's not
> what we have today?
I just want to understand how your idea will work. The query_planner 
does the job for subqueries separately. If a query is transformed in 
some way (let's say, an unnecessary join is deleted), we need to change 
references in the parse tree of another subquery, or it will not find 
the reference at the moment of planning, right?

-- 
regards, Andrei Lepikhov



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: recoveryCheck test failure on flaviventris
Next
From: Fabien Coelho
Date:
Subject: Re: Add partial :-variable expansion to psql \copy