From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Reduce "Var IS [NOT] NULL" quals during constant folding |
Date: | 2025-03-23 08:50:25 |
Message-ID: | CAMbWs4_TPPqTDj89Q84B1V0JshQH=y6DK7jh2zjqYWGK+SH-Mw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 22, 2025 at 1:12 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> However, I'm a bit concerned about the overall premise of the patch
> set. It feels like it is moving something that really ought to happen
> at optimization time back to parse time. I have a feeling that's going
> to break something, although I am not sure right now exactly what.
> Wouldn't it be better to have this still happen in the planner, but
> sooner than it does now?
You're right. It's just flat wrong to collect catalog information in
the parser and use it in the planner. As Tom pointed out, the catalog
information could change in between, which would cause us to use stale
data.
Yeah, this should still happen in the planner, perhaps before
pull_up_sublinks, if we plan to leverage that info to convert NOT IN
to anti-join.
Thanks
Richard
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2025-03-23 09:01:59 | Re: Make COPY format extendable: Extract COPY TO format implementations |
Previous Message | Masahiko Sawada | 2025-03-23 08:45:35 | Re: Parallel heap vacuum |