| From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
|---|---|
| To: | wenhui qiu <qiuwenhuifx(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Wrong results from an antijoin |
| Date: | 2026-10-12 02:30:54 |
| Message-ID: | CAMbWs4-9STFCQcXUhGFqyFosy3Po8nnPTYy=RtCLn=O5pZZ6UA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Oct 12, 2026 at 10:57 AM wenhui qiu <qiuwenhuifx(at)gmail(dot)com> wrote:
> In addition, looking at the regression tests: the patch updates both convert_EXISTS_sublink_to_join() and convert_ANY_sublink_to_join(), but the added tests only cover the NOT EXISTS case. It would be great to also add a test case for NOT IN (which exercises the convert_ANY_sublink_to_join() code path with under_not = true).
Makes sense. But the query you suggested doesn't not work.
int4_tbl.f1 and tenk1.unique1 are both nullable, so the NOT IN is not
converted to an antijoin. In v2 I added a NOT IN test that works.
(That test won't be in the back-patches for v16 to v18.)
- Richard
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2026-10-12 02:50:05 | Re: Improving scalability of Parallel Bitmap Heap/Index Scan |
| Previous Message | Richard Guo | 2026-10-12 02:23:57 | Re: Wrong results from an antijoin |