Re: [BUG] Remove self joins causes 'variable not found in subplan target lists' error

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Sergey Soloviev <sergey.soloviev@tantorlabs.ru>, Alexander Korotkov <aekorotkov@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-08-29T01:39:27Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix semijoin unique-ification for child relations

  2. Fix "variable not found in subplan target lists" in semijoin de-duplication.

  3. Recalculate where-needed data accurately after a join removal.

Richard Guo <guofenglinux@gmail.com> writes:
> On Fri, Aug 29, 2025 at 2:26 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> With one eye on the fast-approaching release freeze for 18rc1,
>> I plan to go ahead and push these.  Please do review if you
>> have time, but I think getting some buildfarm cycles on these
>> is time-critical now.

> I reviewed the v5 patch and found one issue.

Ah, thanks for spotting that.

> I plan to push the fix to both v18 and master, if there are no
> objections.

Please do.

			regards, tom lane