On Wed, 2 Dec 2026 at 14:55, Zhijie Hou <[email protected]> wrote: > > > Thanks for sharing the patch. > > For the patch, I think it is unnecessary to split > describeSubscriptions() into listSubscriptions() and > describeSubscriptions() which duplicates all the column headers and > server-version checks to populate printTable manually. (Most neighboring > functions in describe.c take a (pattern, verbose) interface) > > We can avoid that duplication and preserve the existing formatting by > keeping a single describeSubscriptions(pattern, verbose) function, > fetching conflict_log_table as a trailing internal column when verbose > is set, and populating each subscription's printTable from the PGresult > metadata (PQfname(), PQftype(), and column_type_alignment()). I've > attached a top-up patch (nocfbot-0001) to illustrate this. >
The earlier changes followed the same approach as \dRp, but your suggestion simplifies the patch. I've incorporated your changes. > For the doc: > > 2. doc/src/sgml/ref/psql-ref.sgml > > + If the subscription logs conflicts to a table (see > + <xref > linkend="sql-createsubscription-params-with-conflict-log-destination"/>), > > Since the target <varlistentry>'s <term> includes "(<type>enum</type>)" > and has no xreflabel, "(see <xref .../>)" renders as > "(see conflict_log_destination (enum))". I think it would be better to > use <link> as in other places to avoid the nested "(enum)": Modified The attached v2 version patch has the changes for the same. This version also fixes Shveta's alignment issue from [1]. [1] - https://www.postgresql.org/message-id/CAJpy0uB_%3Df6MCg9vU4f6QGeHq7JLbLdDKoGYgktXqqr9Ro29WQ%40mail.gmail.com Regards, Vignesh
v2-0001-Add-conflict-log-table-information-to-describe-su.patch
Description: Binary data
