Subject: Re: Possibly hard-to-read message

From: Daniel Gustafsson <[email-masked]>
Date: Sun, 6 Apr 2025 23:52:34 +0200

> On 27 Mar 2025, at 02:42, David G. Johnston <[email-masked]> wrote:

> On second thought, something like:
> 
> WATCH_INTERVAL: an integer number of seconds; overrides the default two second \watch interval
> 
> (not quite happy but it's close...keeps the 2s reference point)

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");

--
Daniel Gustafsson

---

From: "David G. Johnston" <[email-masked]>
Date: Sun, 6 Apr 2025 17:43:39 -0700

> 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.