From 50536524004025de6428ad8321860273f71bee24 Mon Sep 17 00:00:00 2001 From: Peter Smith 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