pgsql: Clean up match_orclause_to_indexcol().

2025-11-17 Thread Tom Lane
Clean up match_orclause_to_indexcol(). Remove bogus stripping of RelabelTypes: that can result in building an output SAOP tree with incorrect exposed exprType for the operands, which might confuse polymorphic operators. Moreover it demonstrably prevents folding some OR-trees to SAOPs when the RHS

pgsql: Clean up match_orclause_to_indexcol().

2025-11-17 Thread Tom Lane
Clean up match_orclause_to_indexcol(). Remove bogus stripping of RelabelTypes: that can result in building an output SAOP tree with incorrect exposed exprType for the operands, which might confuse polymorphic operators. Moreover it demonstrably prevents folding some OR-trees to SAOPs when the RHS