model-writtenrun 8755 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Daniel Verite demonstrated that psql silently truncated output when a filesystem filled and proposed checking stream errors after printing, avoiding a large refactoring of individual output calls #1.
- David Zhang tested the patch and suggested including the operating-system error, while Daniel explained that errno could be overwritten between the failed write and the eventual check #2 #4 #5.
- David explored reporting errors inside printing wrappers, but Daniel objected to library routines writing diagnostics directly and emphasized the need to propagate failures to psql; the discussion found no reliable shortcut for preserving errno #6 #8 #9 #11.
- David retained Daniel's stream-checking approach and submitted a revision adding %m, reporting successful tests across Linux, Windows, and macOS and rejecting wrapper and external-library approaches as too complex #12.
- Alvaro Herrera requested PostgreSQL-style diagnostic wording, which David incorporated without changing the error-detection logic #13 #14.
- Peter Eisentraut committed the final patch with the diagnostic changed from printing tuples to printing a result table in b03436994b and announced completion #16; Daniel's acknowledgment closed the thread with the submitted fix landed #17.