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
Re: patch to add \watch to psql |
Список | 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 по дате отправления: