model-writtenrun 9436 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro reported that pgindent misaligned multiline function declarations relative to Emacs in #1, and Tom Lane and Michael Paquier supported fixing the formatter in #2 and #3.
- Thomas Munro traced the problem to prototype postprocessing and supplied a header-specific -npsl workaround in #4, while noting that it did not fix static declarations in C files.
- Thomas Munro tried realigning declarations during postprocessing in #5, rejected that workaround because of overlength lines, and identified pg_bsd_indent's single-line lookahead as the underlying recognition problem.
- Tom Lane supplied multiline lookahead in #6 and explained that pg_bsd_indent does not reflow argument lists, so correcting declaration recognition would still leave some lines needing manual adjustment.
- Tom Lane extended recognition to handle comments and attributes and attached a PostgreSQL-wide formatting preview in #7, concluding that overlength lines were manageable but exposing incorrect formatting of K&R definitions.
- Thomas Munro raised upstream compatibility in #8, and Tom Lane proposed a K&R compatibility switch in #10 because distinguishing old-style parameter declarations from attributes would complicate lookahead.
- Tom Lane committed the prerequisite ANSI conversions in src/port/crypt.c and src/port/isinf.c as da71f98efb, implementing the cleanup discussed in #7 and #10 without a matching attached patch.
- Piotr Stefaniak supported dropping K&R parameter support in #11 and opposed the proposed switch because of GNU option-name compatibility and unnecessary complexity in #13; Tom Lane agreed to remove it in #14.
- The thread ended with Tom Lane's proposed upstream patch in #15, retaining the new recognition behavior without a compatibility switch and adding saved-buffer handling, // comment support, modernized tests, and version 2.1.
- After the last message, 8255c7a5ee landed the formatting changes previewed in #7, refreshed for intervening source changes, and switched pgindent to version 2.1 while removing its obsolete prototype workaround.