From f3c2f106550803d3ce4f70d7af725fdf04569ffe Mon Sep 17 00:00:00 2001 From: Pavan Deolasee Date: Tue, 26 May 2015 11:58:27 +0530 Subject: [PATCH] Pass information about outer relids while creating subquery scan path. LATERAL queries were failing without this information correctly available --- src/backend/optimizer/path/allpaths.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 8a6368056c..943c0c581c 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -1313,7 +1313,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, } else distribution = subroot->distribution; - add_path(rel, create_subqueryscan_path(root, rel, pathkeys, NULL, + add_path(rel, create_subqueryscan_path(root, rel, pathkeys, required_outer, distribution)); /* -- 2.39.5