Re: Allow default \watch interval in psql to be configured
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Daniel Gustafsson <daniel@yesql.se>, Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-10T03:15:17Z
Lists: 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 >
Commits
-
psql: Fix incorrect equality comparison
- 0f3604a518f8 18.0 landed
-
psql: Make test robust against locale variations
- 1eb399366ed6 18.0 landed
-
psql: Make default \watch interval configurable
- 1a759c83278f 18.0 landed