model-writtenrun 8636 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Stehule proposed \gcsv to produce CSV output for one query, especially inside psql macros; Vik Fearing and David Fetter advocated a format argument rather than separate commands for each output format #1 #2 #4.
- Pavel implemented \gf with documentation, completion and tests, explaining that his immediate use case was piping CSV results into gnuplot and that additional options complicated filename and pipe parsing #5 #6.
- After Pavel rebased the patch, Vik reviewed it, requested the name \gfmt and supplied missing filename completion; Pavel incorporated both changes #8 #9 #10.
- Erik Rijkers tested \gfmt successfully but wanted easier tab-separated exports; Daniel Verite pointed out the existing command-line csv_fieldsep option, while the request exposed the usefulness of changing more than the output format #13 #15 #17.
- Tom Lane rejected adding another specialized command because format changes could not compose with expanded output or other settings, and proposed either parenthesized options or temporary formatting state; Vik suggested extending \g itself #18 #19.
- The discussion explored alternate or named formatting configurations, Daniel's push/pop stack and Alvaro Herrera's command aliases; Pavel emphasized concise macros and warned that errors could prevent a later pop from restoring settings #20 #21 #25 #28.
- Tom returned to parenthesized options as the simpler interface, dropping mandatory spaces beside parentheses after objections from Vik and Pavel, and posted a replacement series with general save/restore infrastructure and name=value options, including valueless shortcuts #26 #28 #29 #31.
- Pavel questioned space-separated options and Isaac Morland suggested connection-string quoting, but Tom retained the existing psql lexer and space separation to preserve comma-valued options and variable expansion; Pavel accepted that reasoning, while representing a trailing right parenthesis in an option value remained unresolved #32 #33 #35 #36.
- Tom completed the replacement with documentation, help, regression tests and error-path restoration of temporary settings; the original \gfmt command was superseded by general options on \g and \gx #37.
- With Pavel supporting inclusion before the PostgreSQL 13 feature freeze, Tom committed both final patches unchanged as b63c293bcb and announced the push; the thread ended with Pavel's thanks and no remaining submitted patches awaiting commitment #38 #39 #40.