Re: BUG #19710: Incorrect DELETE result after LEFT JOIN optimization - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19710: Incorrect DELETE result after LEFT JOIN optimization
Date
Msg-id 635522.1789998582@sss.pgh.pa.us
Whole thread
In response to Re: BUG #19710: Incorrect DELETE result after LEFT JOIN optimization  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
List pgsql-bugs
Ayush Tiwari <ayushtiwari.slg01@gmail.com> writes:
> On Mon, 21 Sept 2026 at 12:05, PG Bug reporting form <noreply@postgresql.org>
> wrote:
>> On PostgreSQL 17.10, a `DELETE` statement containing an `EXISTS` subquery
>> with two `LEFT JOIN`s deletes a row even though the subquery predicate is
>> false.

> AFAICS this has been fixed[1] and will be part of next minor versions.

Yeah, this example is pretty nearly a duplicate of bug #19560 [1],
which prompted that rewrite.

            regards, tom lane

[1] https://www.postgresql.org/message-id/19560-54cd7ede78d5e355%40postgresql.org



pgsql-bugs by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: BUG #19698: IMPORT FOREIGN SCHEMA treats a NOT VALID NOT NULL constraint as validated
Next
From: Manuel Reyes Bravo
Date:
Subject: Re: Detaching a child table makes an expression using it unrestorable