model-writtenrun 2773 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier proposed replacing hardcoded catalog values in psql's describe.c with named constants and CppAsString2(), including switching pg_am.h to the frontend-safe pg_am_d.h; he intentionally excluded policies, subscriptions and dependencies and reported checking generated queries with psql -E #1.
- After several weeks, Michael posted a refreshed patch with header ordering and query formatting cleanup, reporting that the generated queries remained unchanged #2.
- Corey Huinker endorsed the clearer meaning, and Daniel Gustafsson checked the replacements and found them correct while wishing for a shorter macro name #3 #4.
- Corey suggested shorter macro names, and Daniel explained that CppAsString2() performs macro expansion before stringification; no naming change entered the patch #5 #6.
- Michael committed the revised patch as 18954ce7f6, adding one overlooked CONSTRAINT_NOTNULL substitution, and announced that remaining hardcoded values needed further header work, with subscription constants intended for a separate thread #2 #7.
- After the commit, Tom Lane supported shortening the macro name but preferred names such as SYM2LIT or SYM2STR over generic names that could collide with other uses #8.
- Peter Eisentraut raised concerns that undefined macro arguments silently become strings and that C character literals need not be valid SQL literals, proposing printf-style character substitution; Tom opposed the resulting separation of placeholders from arguments and suggested improving macro diagnostics instead #9 #11.
- Peter demonstrated the literal-syntax concern with a hexadecimal character escape, and Daniel later shared an experimental type-checking macro that caught misspelled symbols but required changing string concatenation and failed in another macro context #12 #13.
- The describe.c cleanup remained committed at the thread's end, while shorter naming and stronger macro validation remained unresolved experiments 18954ce7f6 #13.