proposal - psql - use pager for \watch command

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема proposal - psql - use pager for \watch command
Дата
Msg-id CAFj8pRBfzUUPz-3gN5oAzto9SDuRSq-TQPfXU_P6h0L7hO+Ehg@mail.gmail.com
обсуждение исходный текст
Ответы Re: proposal - psql - use pager for \watch command
Re: proposal - psql - use pager for \watch command
Список pgsql-hackers
Hi,

last week I finished pspg 3.0 https://github.com/okbob/pspg . pspg now supports pipes, named pipes very well. Today the pspg can be used as pager for output of \watch command. Sure, psql needs attached patch.

I propose new psql environment variable PSQL_WATCH_PAGER. When this variable is not empty, then \watch command starts specified pager, and redirect output to related pipe. When pipe is closed - by pager, then \watch cycle is leaved.

If you want to test proposed feature, you need a pspg with cb4114f98318344d162a84b895a3b7f8badec241 commit.

Then you can set your env

export PSQL_WATCH_PAGER="pspg --stream"
psql
 
SELECT * FROM pg_stat_database;
\watch 1

Comments, notes?

Regards

Pavel

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Poll: are people okay with function/operator table redesign?
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: PG compilation error with Visual Studio 2015/2017/2019