Re: Possibly hard-to-read message

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Possibly hard-to-read message
Date: 2025-06-11 09:36:13
Message-ID: 79374B41-4B6C-4AE4-93EE-B719BE9C2B2C@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 5 Jun 2025, at 13:14, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 07.04.25 02:55, Daniel Gustafsson wrote:
>>> On 7 Apr 2025, at 02:43, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>>> 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.
>> Ah yes, number is better. I'll go ahead with that in the morning.
>
> I came across this psql help text and had a hard time processing it, and, without having read this thread, my thought process was that the message should be phrased more like how it was originally.
>
> The problem with the current phrasing is:
>
> - "if set to a number" seems to indicate that something else happens if it's not a number. But it doesn't say what. And it's also not true. And we don't phrase things like that for other numeric settings.
>
> - The way this is phrased now seems to say that the variable is unset by default, and only if it is set does it override the default. But that is not what happens. The variable has a value by default, and that is what gets used.
>
> I suggest something like this:
>
> number seconds \watch waits between executions (in seconds, default %d)
>
>
> While we're here, the documentation could also use some more detail:
>
> <varlistentry id="app-psql-variables-watch-interval">
> <term><varname>WATCH_INTERVAL</varname></term>
> <listitem>
> <para>
> This variable sets the default interval which <command>\watch</command>
> waits between executing the query. Specifying an interval in the
> command overrides this variable.
> </para>
> </listitem>
> </varlistentry>
>
> This mentions neither the units nor the default value.

How about the attached (reflowing rows in docs not done to keep the diff readable)?

--
Daniel Gustafsson

Attachment Content-Type Size
helptext_v2.diff application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2025-06-11 09:51:02 Re: Feature: psql - display current search_path in prompt
Previous Message shveta malik 2025-06-11 09:34:03 Re: Conflict detection for update_deleted in logical replication