EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery

From: "Lepikhov Andrei" <lepikhov(at)fastmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: Алена Рыбакина <a(dot)rybakina(at)postgrespro(dot)ru>, Дамир Белялов <d(dot)belyalov(at)postgrespro(dot)ru>
Subject: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery
Date: 2023-09-05 05:31:18
Message-ID: dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

While designing a CustomScan node, I got stuck into two errors:
1. "failed to find plan for CTE."
2. "failed to find plan for subquery."
After a short research, I found commit 3f50b82, which shows the problem's origins - setrefs don't change the varno of custom_scan_tlist and can directly reference CTE or Subquery entry. In the "EXPLAIN VERBOSE" case, the deparsing routine can't find dpns->inner_plan for such an entry.

Regards,
Andrei Lepikhov

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Duke Astar 2023-09-05 07:33:27 Re: BUG #18082: coredump during initdb
Previous Message Michael Paquier 2023-09-05 04:58:30 Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()