1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

psql: Reword help message and docs for WATCH_INTERVAL

Reword the documentation around the default value to make interaction
between WATCH_INTERVAL and the \watch command clearer.  While there,
also remove a stray parenthesis left over from a previous version of
the patch.

Reported-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/c34a650b-6f8b-4da7-9ebb-b6df03ce009d@eisentraut.org
This commit is contained in:
Daniel Gustafsson
2025-06-13 15:13:09 +02:00
parent 6e951f279b
commit 29aaeceee2
2 changed files with 8 additions and 6 deletions

View File

@ -3857,7 +3857,7 @@ SELECT 1 \bind \sendpipeline
(if given) is reached, or the query no longer returns the minimum number (if given) is reached, or the query no longer returns the minimum number
of rows. Wait the specified number of seconds (default 2) between executions. of rows. Wait the specified number of seconds (default 2) between executions.
The default wait can be changed with the variable The default wait can be changed with the variable
<xref linkend="app-psql-variables-watch-interval"/>). <xref linkend="app-psql-variables-watch-interval"/>.
For backwards compatibility, For backwards compatibility,
<replaceable class="parameter">seconds</replaceable> can be specified <replaceable class="parameter">seconds</replaceable> can be specified
with or without an <literal>interval=</literal> prefix. with or without an <literal>interval=</literal> prefix.
@ -4756,9 +4756,10 @@ bar
<term><varname>WATCH_INTERVAL</varname></term> <term><varname>WATCH_INTERVAL</varname></term>
<listitem> <listitem>
<para> <para>
This variable sets the default interval which <command>\watch</command> This variable sets the default interval, in seconds, which
waits between executing the query. Specifying an interval in the <command>\watch</command> waits between executing the query. The
command overrides this variable. default is 2 seconds. Specifying an interval in the command overrides
this variable.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -463,8 +463,9 @@ helpVariables(unsigned short int pager)
" VERSION_NAME\n" " VERSION_NAME\n"
" VERSION_NUM\n" " VERSION_NUM\n"
" psql's version (in verbose string, short string, or numeric format)\n"); " psql's version (in verbose string, short string, or numeric format)\n");
HELP0(" WATCH_INTERVAL\n" HELPN(" WATCH_INTERVAL\n"
" if set to a number, overrides the default two second \\watch interval\n"); " number of seconds \\watch waits between executions (default %s)\n",
DEFAULT_WATCH_INTERVAL);
HELP0("\nDisplay settings:\n"); HELP0("\nDisplay settings:\n");
HELP0("Usage:\n"); HELP0("Usage:\n");