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

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Allow default \watch interval in psql to be configured
Date: 2025-03-13 14:03:41
Message-ID: CAKAnmmLb7=eGpFqft3vpk=p6iWaGVwzmDt0+bdU=xvOnWGw_Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

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.

Cheers,
Greg

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2025-03-13 14:10:24 Re: Separate GUC for replication origins
Previous Message Alexandra Wang 2025-03-13 14:02:06 Re: SQL:2023 JSON simplified accessor support