Re: display hot standby state in psql prompt

Jim Jones <jim.jones@uni-muenster.de>

From: Jim Jones <jim.jones@uni-muenster.de>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Srinath Reddy Sadipiralla <srinath2133@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-27T08:08:17Z
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 →
  1. psql: Add %i prompt escape to indicate hot standby status.

  2. Mark search_path as GUC_REPORT

Attachments


On 27/10/2025 04:32, Fujii Masao wrote:
> I think the "hs &&" and "ro &&" checks are no longer needed,
> since we've already confirmed they're not NULL at that point.

Right. Checks removed.

> Also, should "unknown" be marked for translation, as in the \conninfo code?
> I'm not sure whether showing a translated string in the psql prompt is
> desirable, though.

Here I am not sure if it's applicable. In this file there are other
strings that are not marked for translation, "abort", "on", "off". I
changed the string to _("unknown") for now, but we can remove it in
further iterations if we agree it's not desirable :)

v5 attached.

Thanks for the review.

Best, Jim