Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39ae0ef

Browse files
committed
Fix EXPLAIN of SEARCH BREADTH FIRST queries some more.
Commit3f50b82 had an oversight: formerly, to deparse expressionsattached to a plan node, it was only necessary to update thedeparse_namespace ancestors list alongside calling set_deparse_plan.Now it's necessary to update the ancestors list *first*, becauseset_deparse_plan consults it, and one call site got that wrong.This error was masked in most cases because explain.c uses just oneList object for the ancestors list, updating it in-place as the planis scanned, so that we accidentally had the right List assigned todpns->ancestors before it was needed. It would fail only if aWorkTableScan node were the first one that we tried to deparse asubexpression of.Per report from Markus Winand. Like the previous patch,back-patch to v14.Discussion:https://postgr.es/m/648B0505-AA57-42C2-A2DA-E551DE46FA15@winand.at
1 parent68f7c4b commit39ae0ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,8 +3681,8 @@ set_deparse_context_plan(List *dpcontext, Plan *plan, List *ancestors)
36813681
dpns= (deparse_namespace*)linitial(dpcontext);
36823682

36833683
/* Set our attention on the specific plan node passed in */
3684-
set_deparse_plan(dpns,plan);
36853684
dpns->ancestors=ancestors;
3685+
set_deparse_plan(dpns,plan);
36863686

36873687
returndpcontext;
36883688
}
@@ -4836,7 +4836,7 @@ get_rtable_name(int rtindex, deparse_context *context)
48364836
* of a given Plan node
48374837
*
48384838
* This sets the plan, outer_plan, inner_plan, outer_tlist, inner_tlist,
4839-
* and index_tlist fields. Calleris responsible for adjusting the ancestors
4839+
* and index_tlist fields. Callermust already have adjusted the ancestors
48404840
* list if necessary. Note that the rtable, subplans, and ctes fields do
48414841
* not need to change when shifting attention to different plan nodes in a
48424842
* single plan tree.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp