Re: Planner : anti-join on left joins

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Nicolas Adenis-Lamarre <nicolas(dot)adenis(dot)lamarre(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Planner : anti-join on left joins
Date: 2026-01-02 06:53:54
Message-ID: CAHewXNnjQtaOVxLyTdAPNMPFS+BRvrwvOCZd-rLO2=u56Q+QoQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nicolas Adenis-Lamarre <nicolas(dot)adenis(dot)lamarre(at)gmail(dot)com> 于2026年1月2日周五
06:28写道:

> Tender,
> sorry, you patch is perfect. I badly tested it this morning. My fault.
> There is just the case with the constant that is not handled (select *
> from a left join (select 1 const1 from b) x where x.const1 is null)
> but i don't think it worth handling it.
> I added 2 regresssion tests in case you want to add them to your patch.
> The first one is important, the second one is just to confirm that
> subqueries are working.
> I've added 3 new tables because in test_setup.sql and join.sql there
> were no table with not null constraints.
>
> Again, thanks a lot.
>

Thanks for your provided test cases. I had added it to the v3 patch.
Please have a look at the attached patches.
--
Thanks,
Tender Wang

Attachment Content-Type Size
v3-0001-Reduce-JOIN_LEFT-TO-JOIN_ANTI.patch text/plain 3.6 KB
v3-0002-Reduce-JOIN_LEFT-TO-JOIN_ANTI-regression-tests.patch text/plain 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2026-01-02 07:19:50 Re: Create unique GiST indexes
Previous Message shveta malik 2026-01-02 06:36:09 Re: Proposal: Conflict log history table for Logical Replication