public inbox for [email protected]  
help / color / mirror / Atom feed
From: Matheus Alcantara <[email protected]>
To: Fujii Masao <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands
Date: Fri, 20 Feb 2026 09:58:45 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHGQGwGL4JqiKA26fnGx-cTM=VzoTs_uzqejvj4Fawyr4uLUUw@mail.gmail.com>
References: <CAHGQGwGL4JqiKA26fnGx-cTM=VzoTs_uzqejvj4Fawyr4uLUUw@mail.gmail.com>

Hi,

On 16/02/26 11:57, Fujii Masao wrote:
> Hi,
> 
> The psql meta-commands that list publications, subscriptions, and extended
> statistics (\dRp+, \dRs+, and \dX+) do not display their associated comments,
> whereas other \d meta-commands do. This makes it inconvenient to view
> these objects together with their descriptions.
> 
> I'd like to propose the attached patch to improve \dRp+ and \dRs+ so
> they include comments for publications and subscriptions. The patch also
> extends the \dX meta-command to accept the + option, allowing comments
> for extended statistics to be shown when requested. Thoughts?
> 

Thanks for working on this. I miss the \dX+ feature when reviewing 
your other path on improving documentation for CREATE TABLE LIKE.

The code seems correct to me and it's working as described, I don't 
any special comments.

> BTW, while working on this, I also noticed that \dRs+ currently outputs nearly
> all subscription parameter settings (for example, [1]), whereas other
> \d meta-commands tend to show only a subset of details. So, as new parameters
> (or columns in pg_subscription) are added, the number of columns in \dRs+
> will continue to grow, which could make the output harder to use.
> I think it might be better to exclude parameter settings to keep
> the output manageable.
> 
> As just idea, it may be sufficient for \dRs+ to display commonly used
> identifying information such as Conninfo and Description in addition to
> the fields shown by \dRs (Name, Owner, Enabled, and Publication).
> Other details (e.g., Failover) could still be viewed directly in
> pg_subscription.
> Thought?
> 

Yeah, I agree that the output can will be harder to read when the 
number of parameters (or columns) in pg_subscription grow, but since 
most of these columns are visible only on verbose mode (+) it doesn't 
seems an issue IMHO. In the future if the output columns grow too much 
we can rethink this, but for now I think that it's fine.

+1 for the patch. (I've reviewed the v2 attached by Jim on [1])

[1] 
https://www.postgresql.org/message-id/82b25785-0dc1-46d6-93ac-ce385a3a0bfc%40uni-muenster.de

--
Matheus Alcantara
EDB: https://www.enterprisedb.com






view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox