Pass information about outer relids while creating subquery scan path.
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 26 May 2015 06:28:27 +0000 (11:58 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 26 May 2015 06:28:27 +0000 (11:58 +0530)
LATERAL queries were failing without this information correctly available

src/backend/optimizer/path/allpaths.c

index 8a6368056cd04ff192d83adbe94ee9db9ff82339..943c0c581cb179f80f58f05eb0d37802694a7a63 100644 (file)
@@ -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));
 
        /*