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

Commit6eb2f0e

Browse files
committed
Add missing MaterialPath support in reparameterize_path[_by_child].
These two functions failed to cover MaterialPath. That's not afatal problem, but we can generate better plans in some casesif we support it.Tom Lane and Richard GuoDiscussion:https://postgr.es/m/1854233.1669949723@sss.pgh.pa.us
1 parentfe12f2f commit6eb2f0e

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3979,6 +3979,18 @@ reparameterize_path(PlannerInfo *root, Path *path,
39793979
apath->path.parallel_aware,
39803980
-1);
39813981
}
3982+
caseT_Material:
3983+
{
3984+
MaterialPath*mpath= (MaterialPath*)path;
3985+
Path*spath=mpath->subpath;
3986+
3987+
spath=reparameterize_path(root,spath,
3988+
required_outer,
3989+
loop_count);
3990+
if (spath==NULL)
3991+
returnNULL;
3992+
return (Path*)create_material_path(rel,spath);
3993+
}
39823994
caseT_Memoize:
39833995
{
39843996
MemoizePath*mpath= (MemoizePath*)path;
@@ -4013,7 +4025,8 @@ reparameterize_path(PlannerInfo *root, Path *path,
40134025
* path->parent, which does not change during the translation. Hence those
40144026
* members are copied as they are.
40154027
*
4016-
* If the given path can not be reparameterized, the function returns NULL.
4028+
* Currently, only a few path types are supported here, though more could be
4029+
* added at need. We return NULL if we can't reparameterize the given path.
40174030
*/
40184031
Path*
40194032
reparameterize_path_by_child(PlannerInfo*root,Path*path,
@@ -4211,6 +4224,16 @@ do { \
42114224
}
42124225
break;
42134226

4227+
caseT_MaterialPath:
4228+
{
4229+
MaterialPath*mpath;
4230+
4231+
FLAT_COPY_PATH(mpath,path,MaterialPath);
4232+
REPARAMETERIZE_CHILD_PATH(mpath->subpath);
4233+
new_path= (Path*)mpath;
4234+
}
4235+
break;
4236+
42144237
caseT_MemoizePath:
42154238
{
42164239
MemoizePath*mpath;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp