Re: proposal psql \gdesc

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal psql \gdesc
Date: 2017-05-09 18:37:16
Message-ID: alpine.DEB.2.20.1705092031490.8943@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-05-09 18:53:05 Re: Logical replication ApplyContext bloat
Previous Message Marko Tiikkaja 2017-05-09 18:31:19 Re: COMPRESS VALUES feature request