diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index 86057538c5..9bbe11a9de 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -4014,18 +4014,6 @@ get_ec_source_indexes(PlannerInfo *root, EquivalenceClass *ec, Relids relids) rel_esis = bms_add_members(rel_esis, index->source_indexes); } -#ifdef USE_ASSERT_CHECKING - /* verify the results look sane */ - i = -1; - while ((i = bms_next_member(rel_esis, i)) >= 0) - { - RestrictInfo *rinfo = list_nth_node(RestrictInfo, root->eq_sources, - i); - - Assert(bms_overlap(relids, rinfo->clause_relids)); - } -#endif - /* bitwise-AND to leave only the ones for this EquivalenceClass */ return bms_int_members(rel_esis, ec->ec_source_indexes); } @@ -4065,18 +4053,6 @@ get_ec_source_indexes_strict(PlannerInfo *root, EquivalenceClass *ec, } } -#ifdef USE_ASSERT_CHECKING - /* verify the results look sane */ - i = -1; - while ((i = bms_next_member(esis, i)) >= 0) - { - RestrictInfo *rinfo = list_nth_node(RestrictInfo, root->eq_sources, - i); - - Assert(bms_is_subset(relids, rinfo->clause_relids)); - } -#endif - return esis; } @@ -4103,18 +4079,6 @@ get_ec_derive_indexes(PlannerInfo *root, EquivalenceClass *ec, Relids relids) rel_edis = bms_add_members(rel_edis, index->derive_indexes); } -#ifdef USE_ASSERT_CHECKING - /* verify the results look sane */ - i = -1; - while ((i = bms_next_member(rel_edis, i)) >= 0) - { - RestrictInfo *rinfo = list_nth_node(RestrictInfo, root->eq_derives, - i); - - Assert(bms_overlap(relids, rinfo->clause_relids)); - } -#endif - /* bitwise-AND to leave only the ones for this EquivalenceClass */ return bms_int_members(rel_edis, ec->ec_derive_indexes); } @@ -4154,18 +4118,6 @@ get_ec_derive_indexes_strict(PlannerInfo *root, EquivalenceClass *ec, } } -#ifdef USE_ASSERT_CHECKING - /* verify the results look sane */ - i = -1; - while ((i = bms_next_member(edis, i)) >= 0) - { - RestrictInfo *rinfo = list_nth_node(RestrictInfo, root->eq_derives, - i); - - Assert(bms_is_subset(relids, rinfo->clause_relids)); - } -#endif - return edis; }