Re: Bug in psql - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Bug in psql
Date
Msg-id CAKFQuwYawZ=80oP4P8qDWA-YxtKQK_QVnVvH-OQE25benc9SQQ@mail.gmail.com
Whole thread Raw
In response to Bug in psql  (Chris BSomething <xpusostomos@gmail.com>)
List pgsql-bugs
On Wed, Jan 29, 2025 at 3:56 PM Chris BSomething <xpusostomos@gmail.com> wrote:
In psql 17.2, if I do \? it says...

  \dE[S+] [PATTERN]      list foreign tables
  \des[+] [PATTERN]      list foreign servers
  \det[+] [PATTERN]      list foreign tables

notice the duplicate.

If I do \dES+, it is titled "list of relations"... whatever that means.

Relations are a super-class of table-things.  There are many subtypes of relations.  \d Lists relations of all subtypes.  You can also add a single letter to \d to limit the listing to only the subtype-specific relations.  That is what the E is doing here.
 
It seems to be another list of foreign tables but with a different format.

Since \d can only show information limited to the super-class relation, and not specific subtypes, the information for the foreign table subtype needs to be made available somewhere.  That place is \det

I also kind of feel like the name in the help text should always be the name you actually get. So for example, \ddS is described in help as "show object descriptions not displayed elsewhere" (BTW, why is this one "show" and the others are "list"), whereas the output is merely "object descriptions".

This kind of review of consistency doesn't really get treated like a bug report in most cases.  It makes for a decent technical writing R&D project for someone interested in putting in the effort.

David J.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18791: Failed installtion during creation of spatial database
Next
From: Tom Lane
Date:
Subject: Re: Bug in psql