diff options
Diffstat (limited to 'src/backend/optimizer/path/joinpath.c')
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 059e605e04e..821d282497b 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -24,7 +24,6 @@ #include "optimizer/pathnode.h" #include "optimizer/paths.h" #include "optimizer/planmain.h" -#include "optimizer/restrictinfo.h" #include "utils/typcache.h" /* Hook for plugins to get control in add_paths_to_joinrel() */ @@ -131,7 +130,6 @@ add_paths_to_joinrel(PlannerInfo *root, { JoinPathExtraData extra; bool mergejoin_allowed = true; - bool consider_join_pushdown = false; ListCell *lc; Relids joinrelids; @@ -324,24 +322,12 @@ add_paths_to_joinrel(PlannerInfo *root, jointype, &extra); /* - * createplan.c does not currently support handling of pseudoconstant - * clauses assigned to joins pushed down by extensions; check if the - * restrictlist has such clauses, and if so, disallow pushing down joins. - */ - if ((joinrel->fdwroutine && - joinrel->fdwroutine->GetForeignJoinPaths) || - set_join_pathlist_hook) - consider_join_pushdown = !has_pseudoconstant_clauses(root, - restrictlist); - - /* * 5. If inner and outer relations are foreign tables (or joins) belonging * to the same server and assigned to the same user to check access * permissions as, give the FDW a chance to push down joins. */ if (joinrel->fdwroutine && - joinrel->fdwroutine->GetForeignJoinPaths && - consider_join_pushdown) + joinrel->fdwroutine->GetForeignJoinPaths) joinrel->fdwroutine->GetForeignJoinPaths(root, joinrel, outerrel, innerrel, jointype, &extra); @@ -349,8 +335,7 @@ add_paths_to_joinrel(PlannerInfo *root, /* * 6. Finally, give extensions a chance to manipulate the path list. */ - if (set_join_pathlist_hook && - consider_join_pushdown) + if (set_join_pathlist_hook) set_join_pathlist_hook(root, joinrel, outerrel, innerrel, jointype, &extra); } |