Re: patch to add \watch to psql

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: patch to add \watch to psql
Дата
Msg-id 20121020071903.GA21485@toroid.org
обсуждение исходный текст
Ответ на patch to add \watch to psql  (Will Leinweber <will@heroku.com>)
Ответы Re: patch to add \watch to psql
Список pgsql-hackers
At 2012-10-19 17:15:27 -0700, will@heroku.com wrote:
>
> will=# \watch select now();
> Watch every 2s Fri Oct 19 17:09:23 2012
>
>               now
> -------------------------------
>  2012-10-19 17:09:23.743176-07
> (1 row)

The patch looks OK at first glance, and I can confirm that it works as
intended. I can imagine this functionality being useful, e.g. to watch
pg_stat_activity or similar tables.

But a big part of why watch(1) is nice is that the output is overwritten
rather than scrolling. When it's scrolling, it's (a) difficult to notice
that something has changed, and (b) harder to compare values, especially
when the interval is short.

For these reasons, I can imagine using "watch -n2 psql -c …", but not
\watch in its present form. (Of course, I doubt anyone would be enthused
about a proposal to link ncurses into psql, but that's another matter.)

Maybe you should call it \repeat or something. I'm sure people would get
around to using \watch that way eventually. :-)

-- Abhijit



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

Предыдущее
От: David Lee
Дата:
Сообщение: Foreign key constraint on sub-column of composite-type column
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: Move postgresql_fdw_validator into dblink