model-writtenrun 2082 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Banck proposed displaying the connection service in psql prompts so users could distinguish services such as test and production even when database names matched; his two-patch series added PGconn service storage, PQservice(), the SERVICE variable, and the %s prompt escape #1.
- Greg Sabino Mullane compiled and tested the initial series successfully and supported the proposal #2.
- Michael Paquier supported the feature and the %s spelling but requested documentation for both the libpq API and the psql additions #4; Banck supplied it in the next submission #5.
- Paquier then requested a connection-null check consistent with surrounding prompt code and simpler documentation that did not assume a particular service-file location #6, which Banck incorporated in the final original series #7.
- Paquier landed the libpq component unchanged in 4b99fed754 and the psql component with minor placement and wording edits in 477728b5d6, completing the series from #7 and announcing completion in #8.
- Months later, Noah Misch noticed the new exported function during the annual exports.txt review and argued that PQconninfo() already provided the necessary access, while endorsing retention of the PGconn field #10.
- Paquier supplied a follow-up patch removing PQservice() and replacing its psql callers with a service-specific PQconninfo() helper, noting the additional scanning and allocation costs #11.
- Misch suggested considering a cache refreshed by SyncVariables(), while judging repeated lookups unlikely to be costly #12; Paquier proposed generalizing the helper for reuse by a separate SERVICEFILE proposal #13, and Misch left those psql implementation choices to him #14.
- Paquier committed the follow-up as fef6da9e9c, modifying #11 to use a generic connection-option helper and retrieve the prompt value from the synchronized SERVICE variable, with a backport to PostgreSQL 18.
- The thread ends with Paquier confirming the generic helper and cached prompt lookup #15; the service-display feature remains available, the redundant libpq accessor is removed, and no patch remains pending in this thread.