model-writtenrun 4912 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Erki Eessaar reported that INFORMATION_SCHEMA.routines.routine_definition returned an empty string for SQL-standard function bodies introduced in PostgreSQL 14, with a reproducer comparing old and new function syntax #1.
- David G. Johnston traced the problem to reading pg_proc.prosrc directly #2; Tom Lane suggested pg_get_function_sqlbody() and identified a related psql assumption that function bodies always begin with AS #3.
- After David revived the thread over a year later #4, Tom confirmed that numbered \sf output and \ef line selection failed for new-style functions, while noting that reconstructed line breaks need not match the original source #5.
- Tom submitted a patch recognizing both BEGIN and RETURN alongside AS, updating the function-body detection and its documentation; he left tests out initially and questioned how to test \ef portably #6.
- Tom committed that implementation with added psql regression tests as cabfb8241d, making only light additions to #6.
- In September 2024, David asked again about fixing information_schema #7; Tom confirmed that the psql patch had already landed #8, and David clarified that the original routine_definition bug remained unresolved because the view still read prosrc #9.