Re: Possibly hard-to-read message

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-04-07T00:43:39Z
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: Reword help message and docs for WATCH_INTERVAL

  2. psql: Clarify help message for WATCH_INTERVAL

  3. psql: Make default \watch interval configurable

On Sun, Apr 6, 2025 at 2:52 PM Daniel Gustafsson <daniel@yesql.se> wrote:

>
> Looking at the other variables they tend to use "if set, then" so we should
> probably stick to that for this as well?  Something like the below perhaps?
>
>         HELP0("  WATCH_INTERVAL\n"
> -                 "    number of seconds \\watch by default waits between
> executing the query buffer\n");
> +                 "    if set to an interval value, overrides the default
> two second \\watch interval\n");
>
>
Using "interval" here could cause minor confusion since it is a valid core
data type but not accepted here.

psql --set=WATCH_INTERVAL='10m' postgres
psql: error: invalid value "10m" for "WATCH_INTERVAL"

select '10m'::interval;
 interval
----------
 00:10:00

How about:

+ "    if set to a number, overrides the default two second \\watch
interval\n"

I do like the consistency of "if set" even though most of the others are
booleans.

David J.