model-writtenrun 5334 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the discussion by identifying encoding-invalid output and dump/restore risks from non-ASCII "char" values, preferring an encoding-safe external representation over prohibiting existing values; he also raised inconsistent signed integer casts as a nearby issue #1.
- Andrew Dunstan favored preserving ASCII behavior and suggested hexadecimal input, while Tom agreed to preserve ASCII output and wanted a single numeric base #2 #3 #4 #5.
- Chapman Flack suggested considering a broader model for types with independent encodings, but Tom argued that "char" should be treated as a byte-sized enumeration and that its encoding defect should be fixed without waiting for that broader work #7 #8.
- Chapman then proposed bytea-style escaping with backward-compatible literal input, and Peter Eisentraut also recommended bytea escape format; Tom favored octal escapes for high-bit bytes while preserving ordinary ASCII and bare backslash behavior instead of pursuing complete bytea compatibility #9 #10 #12 #14.
- After a seven-month gap and a renewed report elsewhere, Tom posted the first implementation, using octal escapes for high-bit bytes in I/O and text casts while preserving bare backslashes and first-byte truncation of other input; the proposed integer signedness change was not included #16.
- Nikolay Shaplov proposed introducing an ascii_char type and deprecating "char", but Tom rejected renaming because it would exceed the minimum compatibility break needed and could disrupt clients inspecting system catalogs #17 #18.
- Tom added regression coverage without changing the implementation and proposed landing on the development branch and PostgreSQL 15 before beta3, leaving older-branch backpatching for later consideration after observing compatibility feedback #19.
- Andrew requested documentation discouraging user-table use, and Tom agreed that the existing warning covered only name and should cover both internal character types; this was the final exchange in the supplied thread #20 #21.
- Tom subsequently committed #19 with the additional documentation clarification as ec62ce55a8 and backpatched PostgreSQL 15; the supplied evidence leaves backpatching to older branches undecided.