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?
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.