Re: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery

Поиск
Список
Период
Сортировка
От Lepikhov Andrei
Тема Re: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery
Дата
Msg-id 545bcd8f-7789-4054-bea1-44e2584a305a@app.fastmail.com
обсуждение исходный текст
Ответ на Re: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-bugs

On Mon, Sep 11, 2023, at 1:28 PM, Richard Guo wrote:
> Maybe we can use the first plan in CustomScan->custom_plans as the INNER
> referent?  I'm not sure.
After some exploration of ruleutils.c I grasped more on this issue.
If we have come to the CTE or SubPlan entry by the INDEX_VAR link from custom_scan_tlist, we don't have any information
onwhich subplan to go further (entry info already removed because of optimization).
 
To find a specific subplan, we must pass through the custom node subtree and find CteScan or SubqueryScan, whose target
listrefers to this entry. After that, we can go into the subplan to correctly explain the var.
 
It looks like a lot of work. One vague idea is to change set_customscan_references and wrap up CustomScan with useful
data.
Or, maybe it is better not to try to go under the custom_scan_tlist and explain CTE and Subquery right on the level of
theCustomScan?
 

-- 
Regards,
Andrei Lepikhov



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #18046: stats collection behaviour change is affecting the usability of information.
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18107: "policy ... for table ... already exists" errors when restore postgres database from dump