Re: psql \watch 2nd argument: iteration count

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: psql \watch 2nd argument: iteration count
Дата
Msg-id 20230308184944.GA3552001@nathanxps13
обсуждение исходный текст
Ответ на Re: psql \watch 2nd argument: iteration count  (Andrey Borodin <amborodin86@gmail.com>)
Ответы Re: psql \watch 2nd argument: iteration count  (Andrey Borodin <amborodin86@gmail.com>)
Список pgsql-hackers
+1 for adding an iteration count argument to \watch.

+            char *opt_end;
+            sleep = strtod(opt, &opt_end);
+            if (sleep <= 0 || *opt_end)
+            {
+                pg_log_error("Watch period must be positive number, but argument is '%s'", opt);
+                free(opt);
+                resetPQExpBuffer(query_buf);
+                return PSQL_CMD_ERROR;
+            }

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.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal - get_extension_version function
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: optimize several list functions with SIMD intrinsics