model-writtenrun 4439 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Stehule proposed exposing the current function's OID through GET DIAGNOSTICS so logging could identify functions reliably after renaming or schema moves #1; Kirk Wolak described selective logging needs and suggested a constant-like interface #2, while Julien Rouhaud supported the proposal #3.
- Pavel's first patch implemented OID, name, and signature diagnostics using PG_CURRENT_ROUTINE_* names to distinguish the executing routine from the source of an exception #4, and Kirk endorsed that naming #5.
- Kirk reported successful functional and performance testing but identified missing documentation #6, then supplied a complete patch adding documentation #7; Pavel acknowledged both contributions #8.
- Tom Lane recommended exposing only the OID because casts to regproc or regprocedure could supply readable names, and the cached signature could be stale or inconsistent with search_path #9; Pavel removed the other diagnostics and added regression tests #10.
- Tom then argued that GET STACKED DIAGNOSTICS should not report the currently executing routine and proposed shortening the keyword once stacked use was forbidden #11; Pavel implemented both changes in the final submission #12.
- Tom committed the final submission as d3d53f955c, with cosmetic cleanup and replacement tests checking function identity and anonymous-block behavior, and announced the landing #13; Pavel's thanks closed the thread with the reduced OID-only feature landed #14.