Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands
Date: 2026-02-26 13:33:19
Message-ID: CAHGQGwG1jDctb4=AAQ1GsZX3ZDBqJbV7acfBqBd+0frej77ndA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 26, 2026 at 1:57 PM Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> wrote:
>
> On 20.02.2026 18:48, Álvaro Herrera wrote:
> > So if you want details but
> > no comments, you use "\d+", and if you want comments but no details you
> > use "\d*", and if you want everything, then you use \d+* or \d*+?
>
> We need to keep in mind two more modifiers: S for system objects and x
> for eXtended mode.
> So it may be looks like slightly awkward: \dSx+*
>
> Another option is to use psql variable (for example ECHO_COMMENTS
> on/off) to force comments in \d* commands.

Or both? IOW, display comments if either that psql variable is enabled
or "*" is specified in the \d command; otherwise, omit them.

With this approach, users who prefer the current behavior (showing comments
with the "+" option) can simply enable that psql variable and see comments
without adding "*". Conversely, users who prefer not to include comments
can disable that variable and use "*" only when they want to display them.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Henson Choi 2026-02-26 13:34:03 Re: Row pattern recognition
Previous Message Srirama Kucherlapati 2026-02-26 13:15:35 RE: AIX support