Re: BUG #19460: FULL JOIN rewriting issue on empty queries - Mailing list pgsql-bugs

From François Jehl
Subject Re: BUG #19460: FULL JOIN rewriting issue on empty queries
Date
Msg-id CABZtAYZwSQfMgvQXKPiQ5v23UWms_y4hwxXtbxbUWYjwsou5Lw@mail.gmail.com
Whole thread
In response to Re: BUG #19460: FULL JOIN rewriting issue on empty queries  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
Thanks Tom and Richard for the quick diagnosis and fix, I should be the one saying thanks here!

François

On Tue, Apr 21, 2026 at 1:04 AM Richard Guo <guofenglinux@gmail.com> wrote:
On Tue, Apr 21, 2026 at 7:40 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ah: equivclass.c doesn't mind letting em->em_relids be an alias
> for the left_relids or right_relids of some source RestrictInfo.
> That's not problematic as long as those are all constants after
> construction of the EquivalenceClass, but when remove_rel_from_eclass
> is trying to change things, it's a big problem.

ha, I just came to the same conclusion.

> This seems to do the trick to fix it, although I'm going to wait
> for a valgrind regression run to finish before deciding this
> is enough:

This seems safe enough to me.  LGTM.

- Richard

pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: BUG #19464: Server crash (SIGABRT) with UPDATE containing multiple multi-column assignments