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 3b4995cc0f5..d7cb6ec60c1 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -626,6 +626,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, @@ -634,6 +637,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"); + /* Copy number of output rows from subplan */ rel->tuples = rel->subplan->plan_rows; |
