Skip to content

Commit d29b153

Browse files
committed
Fix reversed argument to bms_is_subset.
Ashutosh Bapat
1 parent 734f86d commit d29b153

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,12 +635,12 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel)
635635
* distribute_qual_to_rels, and rel->joininfo should only contain ECs
636636
* where this relation appears on one side or the other.
637637
*/
638-
if (bms_is_subset(restrictinfo->right_ec->ec_relids, relids))
638+
if (bms_is_subset(relids, restrictinfo->right_ec->ec_relids))
639639
useful_eclass_list = list_append_unique_ptr(useful_eclass_list,
640640
restrictinfo->right_ec);
641641
else
642642
{
643-
Assert(bms_is_subset(restrictinfo->left_ec->ec_relids, relids));
643+
Assert(bms_is_subset(relids, restrictinfo->left_ec->ec_relids));
644644
useful_eclass_list = list_append_unique_ptr(useful_eclass_list,
645645
restrictinfo->left_ec);
646646
}

0 commit comments

Comments
 (0)