Re: display hot standby state in psql prompt
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Srinath Reddy Sadipiralla <srinath2133@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-23T21:02:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
psql: Add %i prompt escape to indicate hot standby status.
- dddbbc253b92 19 (unreleased) landed
-
Mark search_path as GUC_REPORT
- 28a1121fd912 18.0 cited
On Wed, Jul 23, 2025 at 10:03:54AM +0200, Jim Jones wrote: > I believe that 'read/write' is more idiomatic than 'read-write' in this > context. 'Read-only' works as a hyphenated adjective, and 'read/write' > is typically treated as a paired label that indicates two distinct > capabilities --- read and write. What do you think? My first thought when looking at this thread/patch was that something like "read-write" might be a bit long for a psql prompt. I probably would've chosen something like "r" or "ro" for read-only and "rw" for read-write. I suppose you could argue that those are more difficult to see, and this seems particularly useful when you want to be sure that you won't inadvertently write any data. -- nathan