\watch stuck on execution of commands returning no tuples

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема \watch stuck on execution of commands returning no tuples
Дата
Msg-id CAB7nPqTvtHEdgW5905BMvVx4wGz7RF0zYCUOY+wSJx8LTeMp6A@mail.gmail.com
обсуждение исходный текст
Ответы Re: \watch stuck on execution of commands returning no tuples
Список pgsql-hackers
Hi all,

When testing \watch, I noticed that process waits indefinitely when executing it with a DDL or a DML.
For example:
postgres=# CREATE TABLE aa (a int);
postgres=# ANALYSE aa \watch 10
-- Process waiting here

By referring at do_watch:command.c, the feature is made such as there is no error if command returns no tuples:
default:
    /* should we fail for non-tuple-result commands? */
    break;
The user can interrupt the process if wanted, but shouldn't it make more sense to return directly an error to the user instead of making the process wait indefinitely?

Regards,
--
Michael

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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Documentation epub format
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Recovery target 'immediate'