Re: Allow default \watch interval in psql to be configured

Greg Sabino Mullane <htamfids@gmail.com>

From: Greg Sabino Mullane <htamfids@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Masahiro Ikeda <ikedamsh@oss.nttdata.com>, Kirill Reshke <reshkekirill@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-21T01:38:58Z
Lists: pgsql-hackers
On Thu, Mar 20, 2025 at 4:45 PM Daniel Gustafsson <daniel@yesql.se> wrote:

> Having a watch interval of zero is IMHO somewhat nonsensical, but since it
> was done intentionally in 6f9ee74d45 (which I had missed) I agree that the
> default should support it as well. Fixed.
>

Yeah, I forgot about that too.  The new patch looks good except for one
tiny little thing: the error should say "must be at least 0.00" or similar,
instead of "must be greater than 0.00" now that we allow 0.00

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

Commits

  1. psql: Fix incorrect equality comparison

  2. psql: Make test robust against locale variations

  3. psql: Make default \watch interval configurable