model-writtenrun 3019 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Karina Litskevich reported that trailing-junk errors could truncate a multibyte character and corrupt the encoding of client messages and logs, then proposed matching the complete following identifier in all three scanners #1.
- Pavel Borisov found unreachable lexer rules and raised concerns about very long error strings #2; Karina resolved the warnings by consolidating the integer-junk rules, choosing this over reordering redundant rules and noting that some malformed hexadecimal inputs would receive different diagnostics #3.
- Tom Lane accepted the approach but requested comments explaining ambiguity and rule ordering, and ruled error-message length limits outside this patch's scope #4.
- Karina confirmed that valid integer rules must precede integer_junk when matches have equal length, then supplied the revision grouping the junk macros under explanatory comments #5 #6.
- Tom reported committing the fix with comment edits and removing the new multibyte regression case because it depended on server encoding; existing test changes demonstrated the fix, and the supplied candidate f37ac613a8 contains the minimal PostgreSQL 15 adaptation he described #7.
- The thread ended with Pavel's acknowledgment after the fix had landed and been backpatched through PostgreSQL 15, with no further patch revision requested #7 #8.