model-writtenrun 678 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- While investigating another bug, Tom Lane discovered that nondeterministic LIKE incorrectly handled escaped ordinary characters at the start of a pattern or immediately after a wildcard, and reported the issue in #1.
- Tom demonstrated an incorrect case-insensitive match and identified a possible call to pg_strncoll() on a partial multibyte character, although he had not constructed a reproducer for that risk #1.
- The attached patch moved deterministic escape handling below nondeterministic matching in MatchText(), cached the nondeterministic flag, clarified comments, and added five regression queries #1.
- The supplied thread ends with that proposal and contains no independent review or subsequent revision #1.
- Tom subsequently committed the complete patch as 51652c42da, with target-base adaptations and a minor comment edit; the commit specifies backpatching through PostgreSQL 18.