From 00beecfe839c878abb366b68272426ed5296bc2b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 6 Apr 2023 13:18:14 -0400 Subject: 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 --- src/bin/psql/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/psql/help.c') diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 48fd51592aa..ecfb3c099bf 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -200,7 +200,7 @@ slashUsage(unsigned short int pager) HELP0(" \\gset [PREFIX] execute query and store result in psql variables\n"); HELP0(" \\gx [(OPTIONS)] [FILE] as \\g, but forces expanded output mode\n"); HELP0(" \\q quit psql\n"); - HELP0(" \\watch [SEC] execute query every SEC seconds\n"); + HELP0(" \\watch [[i=]SEC] [c=N] execute query every SEC seconds, up to N times\n"); HELP0("\n"); HELP0("Help\n"); -- cgit v1.2.3