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

Commitce093aa

Browse files
committed
Fix broken MemoizePath support in reparameterize_path().
It neglected to recurse to the subpath, meaning you'd get backa path identical to the input. This could produce wrong queryresults if the omission meant that the subpath fails to enforcesome join clause it should be enforcing. We don't have a testcase for this at the moment, but the code is obviously brokenand the fix is equally obvious. Back-patch to v14 whereMemoize was introduced.Richard GuoDiscussion:https://postgr.es/m/CAMbWs4_R=ORpz=Lkn2q3ebPC5EuWyfZF+tmfCPVLBVK5W39mHA@mail.gmail.com
1 parentec3daee commitce093aa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/optimizer/util/pathnode.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3937,9 +3937,15 @@ reparameterize_path(PlannerInfo *root, Path *path,
39373937
caseT_Memoize:
39383938
{
39393939
MemoizePath*mpath= (MemoizePath*)path;
3940+
Path*spath=mpath->subpath;
39403941

3942+
spath=reparameterize_path(root,spath,
3943+
required_outer,
3944+
loop_count);
3945+
if (spath==NULL)
3946+
returnNULL;
39413947
return (Path*)create_memoize_path(root,rel,
3942-
mpath->subpath,
3948+
spath,
39433949
mpath->param_exprs,
39443950
mpath->hash_operators,
39453951
mpath->singlerow,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp