model-writtenrun 2239 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Steele reported that PostgreSQL 18 incorrectly included preceding CREATE TABLE text when logging a nested DROP TABLE statement, whereas PostgreSQL 17 isolated the statements correctly #1.
- Michael Paquier initially recalled treating the combined text as expected, but Sami Imseih reproduced and bisected the regression using pg_stat_statements, showing that it occurred only when the last nested statement lacked a trailing semicolon #2 #3.
- After investigating the missing final-statement length, Michael posted a fix that still calculates statement locations when the recorded length is zero, treating zero as extending to the string's end; it also corrected pg_overexplain expectations and added pg_stat_statements regression tests #4 #5.
- Jian He approved the fix and suggested clarifying the zero-length comment, while Anthonin Bonnefoy verified the inner-query locations and identified two unnecessary empty DO blocks; Michael agreed to remove them #6 #7 #8.
- Sami and David independently tested the fix successfully, and David found the remaining pgAudit output changes beneficial while recommending a less misleading test-column name #9 #10.
- Michael committed the patch as 06450c7b8c, retaining the implementation from #5 with only comment and test cleanups, and reported that his pgAudit checks passed #11.
- David retested the committed fix successfully, closing the thread with the regression resolved and no outstanding work identified #12.