Re: [HACKERS] proposal psql \gdesc

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] proposal psql \gdesc
Дата
Msg-id alpine.DEB.2.20.1705092031490.8943@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] proposal psql \gdesc  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: [HACKERS] proposal psql \gdesc  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hello Pavel,

> [...] it is little bit worse. I cannot to distinguish between 
> SELECT\gdesc and TRUNCATE xxx\gdesc . All are valid commands and produce 
> empty result, so result of \gdesc command should be empty result too.
>
> postgres=# truncate table xx\gdesc
> ┌──────┬──────┐
> │ Name │ Type │
> ╞══════╪══════╡
> └──────┴──────┘
> (0 rows)

Hmmm. At least it is better than the previous error.

What about detecting the empty result (eg PQntuples()==0?) and writing 
"Empty result" instead of the strange looking empty table above? That 
would just mean skipping the PrintQueryResult call in this case?

-- 
Fabien.

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

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: Re: [HACKERS] COMPRESS VALUES feature request
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Logical replication ApplyContext bloat