v3-0003-Fix-footer-titles-for-SCHEMA-describe.patch

application/octet-stream

Filename: v3-0003-Fix-footer-titles-for-SCHEMA-describe.patch
Type: application/octet-stream
Part: 1
Message: Re: EXCEPT TABLE - Case inconsistency for describe \d and \dRp+

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v3-0003
Subject: Fix footer titles for SCHEMA describe
File+
src/bin/psql/describe.c 3 3
src/test/regress/expected/publication.out 9 0
src/test/regress/sql/publication.sql 2 0
From 50536524004025de6428ad8321860273f71bee24 Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
Date: Mon, 20 Apr 2026 12:50:58 +1000
Subject: [PATCH v3] Fix footer titles for SCHEMA describe

In passing, add a missing \dn describe test.
---
 src/bin/psql/describe.c                   | 6 +++---
 src/test/regress/expected/publication.out | 9 +++++++++
 src/test/regress/sql/publication.sql      | 2 ++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a58598d82a9..49228117eb6 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -5533,11 +5533,11 @@ listSchemas(const char *pattern, bool verbose, bool showSystem)
 		{
 			/*
 			 * Allocate memory for footers. Size of footers will be 1 (for
-			 * storing "Publications:" string) + publication schema mapping
-			 * count +  1 (for storing NULL).
+			 * storing "Included in publications:" string) + publication
+			 * schema mapping count +  1 (for storing NULL).
 			 */
 			footers = pg_malloc_array(char *, 1 + pub_schema_tuples + 1);
-			footers[0] = pg_strdup(_("Publications:"));
+			footers[0] = pg_strdup(_("Included in publications:"));
 
 			/* Might be an empty set - that's ok */
 			for (i = 0; i < pub_schema_tuples; i++)
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index 8d9eb57ed1a..0345f6c5e47 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -128,6 +128,15 @@ Tables from schemas:
 
 SET client_min_messages = 'ERROR';
 CREATE PUBLICATION testpub_forschema FOR TABLES IN SCHEMA pub_test;
+\dn pub_test
+           List of schemas
+   Name   |          Owner           
+----------+--------------------------
+ pub_test | regress_publication_user
+Included in publications:
+    "testpub_forschema"
+    "testpub_fortable"
+
 -- should be able to create publication with schema and table of the same
 -- schema
 CREATE PUBLICATION testpub_for_tbl_schema FOR TABLES IN SCHEMA pub_test, TABLE pub_test.testpub_nopk;
diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql
index 642e32fa098..041e14a4de6 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -76,6 +76,8 @@ ALTER PUBLICATION testpub_fortable SET TABLES IN SCHEMA pub_test;
 
 SET client_min_messages = 'ERROR';
 CREATE PUBLICATION testpub_forschema FOR TABLES IN SCHEMA pub_test;
+\dn pub_test
+
 -- should be able to create publication with schema and table of the same
 -- schema
 CREATE PUBLICATION testpub_for_tbl_schema FOR TABLES IN SCHEMA pub_test, TABLE pub_test.testpub_nopk;
-- 
2.47.3