psql: add an optional execution-count limit to \watch.
Tom Lane <tgl@sss.pgh.pa.us>
psql: add an optional execution-count limit to \watch. \watch can now be told to stop after N executions of the query. With the idea that we might want to add more options to \watch in future, this patch generalizes the command's syntax to a list of name=value options, with the interval allowed to omit the name for backwards compatibility. Andrey Borodin, reviewed by Kyotaro Horiguchi, Nathan Bossart, Michael Paquier, Yugo Nagata, and myself Discussion: https://postgr.es/m/CAAhFRxiZ2-n_L1ErMm9AZjgmUK=qS6VHb+0SaMn8sqqbhF7How@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +7 −3 |
| src/bin/psql/command.c | modified | +100 −18 |
| src/bin/psql/help.c | modified | +1 −1 |
| src/bin/psql/t/001_basic.pl | modified | +25 −8 |
| src/test/regress/expected/psql.out | modified | +1 −1 |
| src/test/regress/sql/psql.sql | modified | +1 −1 |
Documentation touched
Discussion
- psql \watch 2nd argument: iteration count 33 messages · 2023-02-16 → 2023-05-09