| From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
|---|---|
| To: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Wrong results from an antijoin |
| Date: | 2026-10-11 12:41:03 |
| Message-ID: | CAMbWs4-nAQAyGeEKtcePaC8PPE3-Jfwr5T-9HmDEQseUfrsKSQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Oct 9, 2026 at 12:21 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> So I think a more principled way is to give the antijoin a relid, just
> like an antijoin reduced from a left join has, so that we can leverage
> the well-established outer-join relid machinery to keep quals above
> it.
> I'm writing a patch along these lines, but I'd like to hear what
> others think before going too far.
Here is the patch I end up with.
Of the join types that IS_OUTER_JOIN() covers, ANTI was the only one
that could lack a relid, and only when it came from a sublink. Now
every outer join has one, so we no longer need the "if (j->rtindex !=
0)" checks in the code.
Any thoughts?
- Richard
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Give-antijoins-made-from-sublinks-a-relid.patch | application/octet-stream | 12.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayush Tiwari | 2026-10-11 12:50:07 | Re: [PATCH] Two remaining shmem attachment issues in single-user mode |
| Previous Message | Ayush Tiwari | 2026-10-11 09:54:27 | [PATCH] Clear walsender reader pointers after cleanup |