Re: proposal - psql - use pager for \watch command

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: proposal - psql - use pager for \watch command
Дата
Msg-id CA+hUKGK+j0_6SWwzPk0fiXwwAa7rMcx0dS-OdpyfdM=P4e+UUQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal - psql - use pager for \watch command  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal - psql - use pager for \watch command
Список pgsql-hackers
Here's a rebase, due to a conflict with 3a513067 "psql: Show all query
results by default" which moved a few things around making it harder
to use the pager for the right scope.  Lacking time, I came up with
this change to PSQLexecWatch():

+       if (printQueryFout)
+       {
+               restoreQueryFout = pset.queryFout;
+               pset.queryFout = printQueryFout;
+       }
+
        SetCancelConn(pset.db);
        res = SendQueryAndProcessResults(query, &elapsed_msec, true);
        ResetCancelConn();

        fflush(pset.queryFout);

+       if (restoreQueryFout)
+               pset.queryFout = restoreQueryFout;
+

If someone has a tidier way to factor this, I'm keen to hear it.  I'd
like to push this today.

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql \df choose functions by their arguments
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?