aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 972e3b0810a..e74aa094c02 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -1809,6 +1809,28 @@ reparameterize_path(PlannerInfo *root, Path *path,
case T_SubqueryScan:
return create_subqueryscan_path(root, rel, path->pathkeys,
required_outer);
+ case T_Append:
+ {
+ AppendPath *apath = (AppendPath *) path;
+ List *childpaths = NIL;
+ ListCell *lc;
+
+ /* Reparameterize the children */
+ foreach(lc, apath->subpaths)
+ {
+ Path *spath = (Path *) lfirst(lc);
+
+ spath = reparameterize_path(root, spath,
+ required_outer,
+ loop_count);
+ if (spath == NULL)
+ return NULL;
+ childpaths = lappend(childpaths, spath);
+ }
+ return (Path *)
+ create_append_path(rel, childpaths,
+ required_outer);
+ }
default:
break;
}