model-writtenrun 8990 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Manuel Rigger reported that a bpchar_ops index on a text column caused a LIKE query to fail with a missing equality-operator error and asked whether that index definition should be allowed #1.
- Tom Lane demonstrated that explicit bpchar casts could use the index legitimately and concluded that LIKE optimization should quietly decline unsupported operator combinations #2.
- Tom implemented that stopgap in b3c265d7be, adding regression tests and backpatching the fix to PostgreSQL 12; he confirmed it was pushed in #3.
- In the final message, Tom proposed choosing comparison operators from the argument type before checking index support, retaining special cases for legacy pattern opclasses and demonstrating exact-match LIKE with a hash index #3.
- The attached proposal subsequently landed unchanged apart from catalog whitespace in 2ddedcafca, enabling broader index support without additional discussion or independent review in this thread #3.
- Tom then applied the same operator-selection approach to selectivity estimation in 9ff5b699ed, also preserving text constants for name comparisons; this follow-up had no attached patch, and all proposed attached work had landed.