diff options
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index a14b809a14c..7e3f166d152 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -786,6 +786,9 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, else tuple_fraction = root->tuple_fraction; + /* plan_params should not be in use in current query level */ + Assert(root->plan_params == NIL); + /* Generate the plan for the subquery */ rel->subplan = subquery_planner(root->glob, subquery, root, @@ -794,6 +797,13 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, rel->subrtable = subroot->parse->rtable; rel->subrowmark = subroot->rowMarks; + /* + * Since we don't yet support LATERAL, it should not be possible for the + * sub-query to have requested parameters of this level. + */ + if (root->plan_params) + elog(ERROR, "unexpected outer reference in subquery in FROM"); + /* Mark rel with estimated output rows, width, etc */ set_subquery_size_estimates(root, rel, subroot); |