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

Commite769138

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 parent6eb2f0e commite769138

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
@@ -3994,9 +3994,15 @@ reparameterize_path(PlannerInfo *root, Path *path,
39943994
caseT_Memoize:
39953995
{
39963996
MemoizePath*mpath= (MemoizePath*)path;
3997+
Path*spath=mpath->subpath;
39973998

3999+
spath=reparameterize_path(root,spath,
4000+
required_outer,
4001+
loop_count);
4002+
if (spath==NULL)
4003+
returnNULL;
39984004
return (Path*)create_memoize_path(root,rel,
3999-
mpath->subpath,
4005+
spath,
40004006
mpath->param_exprs,
40014007
mpath->hash_operators,
40024008
mpath->singlerow,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp