patch to add \watch to psql

Поиск
Список
Период
Сортировка
От Will Leinweber
Тема patch to add \watch to psql
Дата
Msg-id CAL8LqZSE+3OC-rkG+rWFShWik=Qjw-K2zWAgjjiX0_fCwuRHhA@mail.gmail.com
обсуждение исходный текст
Ответы Re: patch to add \watch to psql  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Re: patch to add \watch to psql  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
This patch adds \watch to psql. It is much like the unix equivalent, defaulting to every 2 seconds, and allowing you optionally specify a number of seconds.

I will add this to the commit fest app.

Thanks,
Will Leinweber

Example: 

psql (9.3devel, server 9.1.4)
Type "help" for help.

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)

Watch every 2s Fri Oct 19 17:09:25 2012

              now              
-------------------------------
 2012-10-19 17:09:25.745125-07
(1 row)

Watch every 2s Fri Oct 19 17:09:27 2012

              now              
-------------------------------
 2012-10-19 17:09:27.746732-07
(1 row)

^Cwill=# \watch 5 select now();
Watch every 5s Fri Oct 19 17:09:33 2012

              now              
-------------------------------
 2012-10-19 17:09:33.563695-07
(1 row)

Watch every 5s Fri Oct 19 17:09:38 2012

              now              
-------------------------------
 2012-10-19 17:09:38.564802-07
(1 row)

^Cwill=# \watch select pg_sleep(20);
^CCancel request sent
ERROR:  canceling statement due to user request
will=#
Вложения

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

Предыдущее
От: Jeremy Evans
Дата:
Сообщение: Re: Always include encoding of database in pg_dumpall
Следующее
От: David Lee
Дата:
Сообщение: Foreign key constraint on sub-column of composite-type column