Re: BUG #19460: FULL JOIN rewriting issue on empty queries

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, francois(dot)jehl(at)pigment(dot)com, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: BUG #19460: FULL JOIN rewriting issue on empty queries
Date: 2026-04-20 23:04:29
Message-ID: CAMbWs4-GCupgqfKFX83UvPCBcV_kmZ8TzYrsi_qJUFovjEn1-A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Apr 21, 2026 at 7:40 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2026-04-21 00:57:34 Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>
Previous Message Tom Lane 2026-04-20 22:40:16 Re: BUG #19460: FULL JOIN rewriting issue on empty queries