public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: [email protected]
Subject: pgsql: psql: Make default \watch interval configurable
Date: Tue, 25 Mar 2025 16:58:15 +0000
Message-ID: <[email protected]> (raw)

psql: Make default \watch interval configurable

The default interval for \watch to wait between executing queries,
when executed without a specified interval, was hardcoded to two
seconds.  This adds the new variable WATCH_INTERVAL which is used
to set the default interval, making it configurable for the user.
This makes \watch the first command which has a user configurable
default setting.

Author: Daniel Gustafsson <[email protected]>
Reviewed-by: Heikki Linnakangas <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Kirill Reshke <[email protected]>
Reviewed-by: Masahiro Ikeda <[email protected]>
Reviewed-by: Laurenz Albe <[email protected]>
Reviewed-by: Greg Sabino Mullane <[email protected]>
Reviewed-by: Ashutosh Bapat <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a759c83278fcdae11ee5da8318b646b9d47129c

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 13 ++++++++
src/bin/psql/command.c         |  6 ++--
src/bin/psql/help.c            |  2 ++
src/bin/psql/settings.h        |  7 +++++
src/bin/psql/startup.c         | 18 +++++++++++
src/bin/psql/t/001_basic.pl    | 24 +++++++++++++++
src/bin/psql/variables.c       | 70 ++++++++++++++++++++++++++++++++++++++++++
src/bin/psql/variables.h       |  3 ++
8 files changed, 141 insertions(+), 2 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: psql: Make default \watch interval configurable
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox