Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Junwang Zhao <zhjwpku@gmail.com>
From: Junwang Zhao <zhjwpku@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Tomas Vondra <tomas@vondra.me>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, David Rowley <dgrowleyml@gmail.com>, Tender Wang <tndrwang@gmail.com>,
Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-08T13:07:55Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix misuse of Relids for storing attribute numbers
- 2d756ebbe857 19 (unreleased) landed
-
Reduce "Var IS [NOT] NULL" quals during constant folding
- e2debb64380e 19 (unreleased) landed
-
Centralize collection of catalog info needed early in the planner
- 904f6a593a06 19 (unreleased) landed
-
Expand virtual generated columns before sublink pull-up
- e0d05295268e 19 (unreleased) landed
-
Expand virtual generated columns in the planner
- 1e4351af329f 18.0 cited
Attachments
- v2-0001-use-Bitmapset-to-represent-not-null-attr-nums.patch (application/octet-stream) patch v2-0001
On Mon, Sep 8, 2025 at 4:21 PM Richard Guo <guofenglinux@gmail.com> wrote: > > On Sun, Sep 7, 2025 at 8:12 PM Junwang Zhao <zhjwpku@gmail.com> wrote: > > While reading this thread, I found that it uses *Relids* to collect NOT NULL > > attribute numbers, I think this might be an oversight, since ISTM that > > Relids is used to represent the index of the relation in the range table. > > Nice catch; it's better to use Bitmapset * rather than Relids in this > scenario. That was my oversight; will fix it. > > > So I think it would be better to be consistent, anyway I post a trivial patch > > if the community agrees with me. > > Your patch misses one spot: the notnullattnums in > get_relation_notnullatts() should also be fixed. Otherwise it LGTM. True, attached v2 adds that missing spot, thanks for the review. > > - Richard -- Regards Junwang Zhao