model-writtenrun 8685 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Masahiko Sawada opened the thread with four missing errcode() wrappers in adminpack and page-checksum reporting, supplying a patch that restores the intended SQLSTATE values in #1.
- Michael Paquier checked that the same omissions affected supported branches down to 9.5 in #4, while Tom Lane urged fixing them immediately and separately investigating how to prevent similar mistakes in #6.
- Amit Kapila committed Sawada's patch unchanged as b4f140869f, backpatched it through 9.5, and announced completion in #8.
- Andres Freund described confusing ereport syntax and compiler diagnostics in #10 and #12; Tom proposed optional extra parentheses through variadic macros in #11 and standalone comma expressions that expose unused constants to compiler warnings in #13.
- Tom demonstrated that approach in #14, reporting useful GCC and Clang warnings and suggesting further simplification of auxiliary return values and elog argument evaluation.
- Andres independently supplied a broader three-patch implementation in #15, converting helpers to void, implementing elog through ereport, and moving location and translation-domain arguments to errfinish; he acknowledged the parallel prototypes in #16.
- Tom identified that elog must use errmsg_internal() and rejected enforcing auxiliary calls through a local error-state variable because errcontext can be used elsewhere in #17; Andres confirmed that default SQLSTATE behavior remained equivalent in #18.
- After investigating compiler support, Tom favored limiting the macro backpatch to PostgreSQL 12 and retaining parentheses as the preferred style for compatibility in #19, while Alvaro Herrera supported accepting future code without them in #20.
- Tom revised and split the series in #21, keeping translation-domain setup in errstart() because auxiliary functions need it immediately, restoring a single comma expression for reliable warnings, and separating the backpatchable macro change from ABI-breaking cleanups.
- Andres raised sanitizer and control-flow-integrity concerns about changing errfinish's signature in PostgreSQL 12 in #22, and Tom agreed to preserve that interface while rejecting the separate idea of embedding logging policy in the macro in #23.
- Tom landed the revised first part of #21 as e3a87b4991, preserving the errfinish ABI and backpatching the optional-parentheses syntax to PostgreSQL 12, then landed the development-only implementation cleanups as 17a28b0364 and confirmed that both parts were committed in #25.
- Thomas Munro reported a buildfarm compiler rejecting a conditional expression mixing a void-returning helper with integer zero in #26; Tom chose to restore integer return values instead of requiring callers to change in #27, implemented that partial revert as bda6dedbea, and confirmed it in #28.
- The thread ended with the fixes and remaining redesign committed: Craig Ringer requested clearer documentation of conditional error fields in #29, Tom invited documentation text in #30, and Andres questioned exposing implementation details while leaving a broader logging-API redesign open in #31.