model-writtenrun 5149 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed generated output support for utility statements to improve debugging and eliminate handwritten Query serialization, initially keeping utility readers disabled because their code-size cost lacked a clear benefit #1.
- Andres Freund suggested treating the additional code as cold and identified round-trip testing as a possible use for readers, while Tom initially preferred waiting for a concrete need #2 #3 #4 #5.
- Tatsuo Ishii raised raw-parse debugging as a useful application, and Peter Eisentraut identified utility statements in unquoted SQL function bodies as a near-term reason to support reading as well as writing #6 #7.
- Tom accepted Peter's use case and revised the proposal to remove the remaining generator suppression hacks, judging the roughly 10 kB saved by excluding raw-only readers too small to justify the complexity #8 #9.
- Testing utility-statement round trips exposed missing handwritten readers for Constraint and other raw nodes, which Tom identified as the next obstacle #10.
- Peter supplied a separate follow-up series fixing minimum-integer and BitString tokenization, implementing missing readers, adding round-trip checks, and experimentally enabling utility statements in SQL function bodies; he also identified unresolved empty-string serialization and float-precision problems #11.
- After Andres highlighted failing empty-tablespace tests, Tom designed an encoding that preserves <> for NULL and uses two double quotes for empty strings without changing pg_strtok(), and Andres endorsed the design #12 #13 #14 #15.
- Tom revised Peter's series with token-length checks, the empty-string fix, and unconditional Ryu float output in place of a special testing mode; he dropped SQL-function utility support because pg_dump failed and complete utility-query reconstruction would require extensive deparser work #16.
- Tom further questioned the SQL-function feature because unanalyzed utility statements cannot provide the dependency and search_path guarantees of analyzed statements, suggested dynamic SQL as an alternative, and recommended pursuing that design in another thread #17.
- Peter committed the unchanged integer and BitString fixes from the final series as 43f4b34915 and 2cb1a5a8d4, and the missing readers with Tom's length checks as a6bc330192, all matching #16.
- Tom's empty-string encoding and Ryu float-output fixes from #16 landed unchanged as 8999f5ed3c and acd624644b.
- The final raw-tree and rewritten-utility round-trip checks from #16 landed unchanged as 40ad8f9dee and 787102b563, while the attachment that globally enabled the debugging macro was intentionally excluded.
- Peter announced completion and closed the commitfest entry, leaving utility statements in unquoted SQL function bodies without a concrete plan for further work #18.
- Months later, Alexander Lakhin reproduced a Valgrind failure caused by _readA_Const() copying a full union from a smaller Integer allocation, and Tom agreed that copying must depend on the actual value type #19 #20.
- Tom implemented that discussion-driven fix in e060cd59fa, also simplifying _equalA_Const(); this resolves the final reported bug, while the deferred SQL-function feature remains outside the completed work.