Re: display hot standby state in psql prompt
Jim Jones <jim.jones@uni-muenster.de>
From: Jim Jones <jim.jones@uni-muenster.de>
To: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-23T08:03:54Z
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
Attachments
- v3-0001-Add-i-prompt-escape-to-indicate-server-read-only-.patch (text/x-patch) patch v3-0001
Hi Srinath On 23.07.25 09:03, Srinath Reddy Sadipiralla wrote: > +1 for the patch,i have reviewed and tested this patch, except these > below cosmetic changes it LGTM. > > cosmetic changes: > 1) add comment about %i in get_prompt api. Done. > 2) maybe we can use read-write instead of read/write to be consistent > with the > naming such as options of target_session_attrs uses read-write. 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? v3 attached. Thanks for the thorough testing and review! Best, Jim