pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lepikhov Andrei <lepikhov@fastmail.com>
To: pgsql-bugs@lists.postgresql.org
To: tgl@sss.pgh.pa.us
Cc: Алена Рыбакина <a.rybakina@postgrespro.ru>
Cc: Дамир Белялов <d.belyalov@postgrespro.ru>
Subject: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery
Date: Tue, 05 Sep 2023 12:31:18 +0700
Message-ID: <dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com> (raw)

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





view thread (7+ messages)  latest in thread

Message-ID: <dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com>
Permalink:  ../dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com/
Also on:    postgresql.org/message-id/dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: lepikhov@fastmail.com, tgl@sss.pgh.pa.us, a.rybakina@postgrespro.ru, d.belyalov@postgrespro.ru
  Subject: Re: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery
  In-Reply-To: <dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com>
  References: <dfe47e78-f9c3-4f59-a345-591f7fd3ceec@app.fastmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox