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

From Richard Guo
Subject Re: BUG #19460: FULL JOIN rewriting issue on empty queries
Date
Msg-id CAMbWs4-GCupgqfKFX83UvPCBcV_kmZ8TzYrsi_qJUFovjEn1-A@mail.gmail.com
Whole thread
In response to Re: BUG #19460: FULL JOIN rewriting issue on empty queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #19460: FULL JOIN rewriting issue on empty queries
List pgsql-bugs
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: Tom Lane
Date:
Subject: Re: BUG #19460: FULL JOIN rewriting issue on empty queries
Next
From: Richard Guo
Date:
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34