aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/optimizer/util/pathnode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index ad3070352f0..a3880c7624c 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -3937,9 +3937,15 @@ reparameterize_path(PlannerInfo *root, Path *path,
case T_Memoize:
{
MemoizePath *mpath = (MemoizePath *) path;
+ Path *spath = mpath->subpath;
+ spath = reparameterize_path(root, spath,
+ required_outer,
+ loop_count);
+ if (spath == NULL)
+ return NULL;
return (Path *) create_memoize_path(root, rel,
- mpath->subpath,
+ spath,
mpath->param_exprs,
mpath->hash_operators,
mpath->singlerow,