Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4be235

Browse files
danolivoAndrey Lepikhov
authored andcommitted
Add SubqueryScanPath support
1 parent c05385e commit d4be235

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

path_utils.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@ get_path_clauses(Path *path, PlannerInfo *root, List **selectivities)
153153
return get_path_clauses(((SetOpPath *) path)->subpath, root,
154154
selectivities);
155155
break;
156+
case T_SubqueryScanPath:
157+
/*
158+
* According to the SubqueryScanPath description, we need to use
159+
* path.parent->subroot as the planning context for interpretation
160+
* of the subpath.
161+
*/
162+
return get_path_clauses(((SubqueryScanPath *) path)->subpath,
163+
path->parent->subroot,
164+
selectivities);
165+
break;
156166
case T_LockRowsPath:
157167
return get_path_clauses(((LockRowsPath *) path)->subpath, root,
158168
selectivities);
@@ -161,10 +171,6 @@ get_path_clauses(Path *path, PlannerInfo *root, List **selectivities)
161171
return get_path_clauses(((LimitPath *) path)->subpath, root,
162172
selectivities);
163173
break;
164-
case T_SubqueryScanPath:
165-
return get_path_clauses(((SubqueryScanPath *) path)->subpath, root,
166-
selectivities);
167-
break;
168174
case T_AppendPath:
169175
{
170176
ListCell *lc;

0 commit comments

Comments
 (0)