when called from extract_restriction_or_clauses(), the 4th check in join_clause_is_movable_to() is unnecessary

2025-10-28 Thread iosif
The following analysis is based on version 15.14, but also applies to later versions.  Function join_clause_is_movable_to() is called from multiple callers, like match_join_clauses_to_index(), extract_restriction_or_clauses(), etc. When called from match_join_clauses_to_index(), it's necessary t

There is a redundant check in check_outerjoin_delay() in version 15.14 and below

2025-10-21 Thread iosif
Hi: The following snippet is cited from version 15.14, function check_outerjoin_delay() 2055:/* yes; have we included all its rels in relids? */ 2056:if (!bms_is_subset(sjinfo->min_lefthand, relids) || 2057:  !bms_is_su