Re: psql \watch 2nd argument: iteration count

Andrey Borodin <amborodin86@gmail.com>

From: Andrey Borodin <amborodin86@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, sfrost@snowman.net, peter.eisentraut@enterprisedb.com, pgsql-hackers@postgresql.org
Date: 2023-03-09T00:22:47Z
Lists: pgsql-hackers

Attachments

On Wed, Mar 8, 2023 at 10:49 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> Is there any reason to disallow 0 for the sleep argument?  I often use
> commands like "\watch .1" to run statements repeatedly with very little
> time in between, and I'd use "\watch 0" instead if it was available.
>

Yes, that makes sense! Thanks!

Best regards, Andrey Borodin.

Commits

  1. psql: add an optional execution-count limit to \watch.

  2. Improve handling of psql \watch's interval argument