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

From Pavel Stehule
Subject Re: Allow default \watch interval in psql to be configured
Date
Msg-id CAFj8pRB53mJGEiiik_7dNxVVejYXTO6iScES-en6G5UnGoC5fA@mail.gmail.com
Whole thread Raw
In response to Re: Allow default \watch interval in psql to be configured  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers


čt 10. 10. 2024 v 2:02 odesílatel Michael Paquier <michael@paquier.xyz> napsal:
On Wed, Oct 09, 2024 at 04:24:27PM +0200, Daniel Gustafsson wrote:
> Fixed.

-        double        sleep = 2;
+        double        sleep = pset.watch_interval;

This forces the use of seconds as unit.  The interval values I have
been using a lot myself are between 0.2s and 0.5s because I usually
want a lot more granularity in my lookups than the 1s interval.  Could
it be better to allow values lower than 1s or let this value be a
string with optional "s" or "ms" units?

Linux "watch" uses just seconds. If I remember correctly the psql doesn't use units in settings, so I prefer just the value from interval 0.1 .. 3600 * n

and the number can be rounded to 0.1

Regards

Pavel

 
--
Michael

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Doc: typo in config.sgml
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] Add some documentation on how to call internal functions