Re: A modest proposal: make parser/rewriter/planner inputs read-only

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: A modest proposal: make parser/rewriter/planner inputs read-only
Date: 2025-04-15 10:00:53
Message-ID: 869744ec-4372-41c0-8fbd-4523f5d6dc93@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/5/25 18:46, Tom Lane wrote:
> I'm not planning to pursue this idea Right Now, but it seems like
> something that could happen for v19 or so. In the meantime I wanted
> to get the ideas down on electrons.
>
> Thoughts?
I generally like the idea because, for now, I need to be sure that no
one touched the parse tree before copying it to do additional
transformations before the optimisation phase.
But what is the way you are proposing here? Do you mean that one more
entity will be explicitly introduced: a transformed parse tree?
It would open an opportunity for extensions to build a set of
alternative transformed trees, pass them through the optimisation phase
and choose the best plan.

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-04-15 10:04:54 Re: Recent pg_rewind test failures in buildfarm
Previous Message Mahendra Singh Thalor 2025-04-15 09:52:20 Re: [Proposal] Add \dAt [AMPTRN [TBLPTRN]] to list tables by Table Access Method in psql