Re: BUG #18522: Wrong results with Merge Right Anti Join, inconsistent with Merge Anti Join

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: antti@lampinen.eu, pgsql-bugs@lists.postgresql.org
Date: 2024-06-25T02:07:31Z
Lists: pgsql-bugs
On Tue, Jun 25, 2024 at 2:37 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> The following two queries result in different query plans and different
> results, even though there is only a dummy condition change between them.
> The
> latter results are correct, there are two rows that match the conditions.

Thank you for reporting.  As far as I recall, this is the first
field-reported bug about the right anti join!

Could you please provide the schema and necessary data for the two
tables to reproduce this bug?  If there is a self-contained repro, that
would be great.

Thanks
Richard



Commits

  1. Fix right-anti-joins when the inner relation is proven unique