Fix SJE 'variable not found in subplan target lists' error

Edit
ID 5991
Title Fix SJE 'variable not found in subplan target lists' error
CI (CFBot) Needs rebase! Needs rebase since 5 days. Failing since 6 days.
Additional links previous successfully applied patch (outdated):
Summary
Stats (from CFBot) Unknown
Topic Bug Fixes
Tags Bugfix
Created 2025-08-25 09:56:17
Last modified 2025-09-01 09:16:48 (yesterday)
Latest email 2025-08-29 04:27:26 (4 days ago)
Status
PG19-2 (2025-09-01 – 2025-09-30): Committed
Target version stable
Authors Maksim Milyutin (maksm90), Ilia Evdokimov (ilidock95), Ivan Kush (ivankush), Sergey Solovev (ashblade)
Reviewers Become reviewer
Committer Tom Lane (tgl)
Links
Emails
[BUG] Remove self joins causes 'variable not found in subplan target lists' error
First at 2025-08-22 15:27:16 by Sergey Soloviev <sergey.soloviev at tantorlabs.ru>
Latest at 2025-08-29 04:27:26 by Richard Guo <guofenglinux at gmail.com>
Latest attachment (v5-fix-variable-not-found-in-subplan-target-lists-master.patch) at 2025-08-28 17:26:46 from Tom Lane <tgl at sss.pgh.pa.us>
    Attachment (v5-fix-variable-not-found-in-subplan-target-lists-master.patch) at 2025-08-28 17:26:46 from Tom Lane <tgl at sss.pgh.pa.us> (Patch: Yes)
    Attachment (fix-SJE-after-revert-a3179ab69.patch) at 2025-08-28 06:18:53 from Richard Guo <guofenglinux at gmail.com> (Patch: Yes)
    Attachment (revert-a3179ab69-doesnt-work.patch) at 2025-08-27 21:42:24 from Tom Lane <tgl at sss.pgh.pa.us> (Patch: Yes)
    Attachment (v4-0001-fix-variable-not-found-in-subplan-target-lists.patch) at 2025-08-26 09:30:24 from Richard Guo <guofenglinux at gmail.com> (Patch: Yes)
    Attachment (v3-fix-variable-not-found-in-subplan-target-lists.patch) at 2025-08-25 19:16:07 from Tom Lane <tgl at sss.pgh.pa.us> (Patch: Yes)
    Attachment (0002-fix-variable-not-found-in-subplan-target-lists.patch) at 2025-08-25 16:57:31 from Sergey Soloviev <sergey.soloviev at tantorlabs.ru> (Patch: Yes)
    Attachment (schema.sql) at 2025-08-22 15:27:16 from Sergey Soloviev <sergey.soloviev at tantorlabs.ru> (Patch: No)
History
When Who What
2025-09-01 09:16:48 Sergey Solovev (ashblade) Closed in commitfest PG19-2 with status: Committed
2025-09-01 09:16:48 Sergey Solovev (ashblade) Changed committer to tgl
2025-08-28 07:02:20 CFbot Patch needs rebase
2025-08-25 09:56:18 Sergey Solovev (ashblade) Attached mail thread 1fd1a421-4609-4d46-a1af-ab74d5de504a@tantorlabs.ru
2025-08-25 09:56:17 Sergey Solovev (ashblade) Created patch record
Edit