Improving psql slash usage help message - Mailing list pgsql-hackers

From Hamid Akhtar
Subject Improving psql slash usage help message
Date
Msg-id CANugjhsen=5+BoxaRQm6iXd=HUhDE+FcggozR6T5_pnzbkTf2A@mail.gmail.com
Whole thread Raw
Responses Re: Improving psql slash usage help message
List pgsql-hackers
psql slash usage show two options for listing foreign tables.

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

This seems a little odd especially when the output of both of these commands is different.

postgres=# \dE+
           List of relations
 Schema | Name |     Type      | Owner  
--------+------+---------------+--------
 public | foo  | foreign table | highgo
(1 row)

postgres=# \det
  List of foreign tables
 Schema | Table | Server  
--------+-------+---------
 public | foo   | orc_srv
(1 row)


"\dE" displays the list with a "List of relations" heading whereas "\det" displays "List of foreign tables". So, to differentiate the two, I suggest to change the help message for "\dE" to:

  \dE[S+] [PATTERN]      list foreign relations

One could argue that both essentially mean the same thing, however, considering "\dE+" also outputs size, it makes sense IMHO to make this change (as PG documentation: relation is essentially a mathematical term for table). Attached is the patch that makes this change.

Regards.

--
Highgo Software (Canada/China/Pakistan)
URL : www.highgo.ca
ADDR: 10318 WHALLEY BLVD, Surrey, BC
CELL:+923335449950  EMAIL: mailto:hamid.akhtar@highgo.ca
SKYPE: engineeredvirus
Attachment

pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: WIP: WAL prefetch (another approach)
Next
From: "David G. Johnston"
Date:
Subject: Re: Improving psql slash usage help message