aboutsummaryrefslogtreecommitdiff
path: root/src/backend/foreign/foreign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/foreign/foreign.c')
-rw-r--r--src/backend/foreign/foreign.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/foreign/foreign.c b/src/backend/foreign/foreign.c
index 9c57f7a259c..a57e59f27ea 100644
--- a/src/backend/foreign/foreign.c
+++ b/src/backend/foreign/foreign.c
@@ -821,8 +821,9 @@ GetExistingLocalJoinPath(RelOptInfo *joinrel)
* for the mergejoin, we can skip doing an explicit sort.
*/
if (merge_path->outersortkeys &&
- pathkeys_contained_in(merge_path->outersortkeys,
- joinpath->outerjoinpath->pathkeys))
+ pathkeys_count_contained_in(merge_path->outersortkeys,
+ joinpath->outerjoinpath->pathkeys,
+ &merge_path->outer_presorted_keys))
merge_path->outersortkeys = NIL;
}
}