Re: Allow default \watch interval in psql to be configured - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Allow default \watch interval in psql to be configured
Date
Msg-id 02A3B3C0-0FFB-4072-A754-04FC9F2207BB@yesql.se
Whole thread Raw
In response to Re: Allow default \watch interval in psql to be configured  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: Allow default \watch interval in psql to be configured
Re: Allow default \watch interval in psql to be configured
List pgsql-hackers
On 13 Mar 2025, at 15:03, Greg Sabino Mullane <htamfids@gmail.com> wrote:

Patch looks good. One minor issue:

greg=# \set WATCH_INTERVAL -1
invalid value "-1" for "WATCH_INTERVAL": must be greater than 0.00
greg=# \set WATCH_INTERVAL 0.00
greg=#

We should disallow 0 as the error message implies

Ah, nice catch, fixed in the attached along with a test for the minimum bound (ie zero).

I've long wanted to be able to set the default interval for \watch in psql since I almost never want a 2 second wait. 

Curious what other's personal defaults are? I usually use 1 second or 0.5 depending on things.

I rarely use anything higher than 0.5.

--
Daniel Gustafsson

Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Separate GUC for replication origins
Next
From: Amit Kapila
Date:
Subject: Re: Add an option to skip loading missing publication to avoid logical replication failure