Re: Reduce "Var IS [NOT] NULL" quals during constant folding - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Date
Msg-id CA+TgmoZUNpgTMhm=Qd9mOkndHMW6=ghgfSgX_ZMq=COiONOcAQ@mail.gmail.com
Whole thread Raw
In response to Re: Reduce "Var IS [NOT] NULL" quals during constant folding  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reduce "Var IS [NOT] NULL" quals during constant folding
List pgsql-hackers
On Thu, Apr 10, 2025 at 3:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > A related point that I'm noticing is that you record the not-NULL
> > information in the RangeTblEntry.
>
> Did we not just complain about that w.r.t. the v1 version of this
> patch?  RangeTblEntry is not where to store this info.  We need
> a new data structure, and IMO the data structure should be a hashtable
> based on table OID, not relid.  That way we can amortize across
> multiple references to the same table within a query.

It's not quite the same complaint, because the earlier complaint was
that it was actually being done at parse time, and this complaint is
that it is scribbling on a parse-time data structure.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions
Next
From: Dave Cramer
Date:
Subject: Re: Correct documentation for protocol version