public inbox for [email protected]  
help / color / mirror / Atom feed
Fix how some lists are displayed by psql \d+
13+ messages / 4 participants
[nested] [flat]

* Fix how some lists are displayed by psql \d+
@ 2026-01-08 22:47  Peter Smith <[email protected]>
  0 siblings, 3 replies; 13+ messages in thread

From: Peter Smith @ 2026-01-08 22:47 UTC (permalink / raw)
  To: PostgreSQL Hackers <[email protected]>

Hi.

I recently saw that the psql \d+ lists for "Partitions:" are not
aligned in quite the same way as other lists ("Publications:" etc)
because they use indents and line breaks differently. e.g. See below:

test_pub=# \d+ part1
                                    Partitioned table "public.part1"
 Column |  Type   | Collation | Nullable | Default | Storage |
Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
 a      | integer |           |          |         | plain   |
    |              |
Partition of: t1 FOR VALUES FROM (0) TO (50)
Partition constraint: ((a IS NOT NULL) AND (a >= 0) AND (a < 50))
Partition key: RANGE (a)
Publications:
    "pub1"
    "pub2"
    "pub_only"
Partitions: part1_1 FOR VALUES FROM (0) TO (25), PARTITIONED,
            part1_2 FOR VALUES FROM (25) TO (50)

~~~

PSA v1
0001 - Fix (common code) lists for "Partitions:" and "Child tables:"
0002 - Fix list for "Inherits:" in the same way

~~~

The *patched* result for the same example now looks like below. Notice
that in passing I also removed the comma separators, which are not
present in the other footer lists.

test_pub=# \d+ part1
                                    Partitioned table "public.part1"
 Column |  Type   | Collation | Nullable | Default | Storage |
Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
 a      | integer |           |          |         | plain   |
    |              |
Partition of: t1 FOR VALUES FROM (0) TO (50)
Partition constraint: ((a IS NOT NULL) AND (a >= 0) AND (a < 50))
Partition key: RANGE (a)
Publications:
    "pub1"
    "pub2"
    "pub_only"
Partitions:
    part1_1 FOR VALUES FROM (0) TO (25), PARTITIONED
    part1_2 FOR VALUES FROM (25) TO (50)

======
Kind Regards,
Peter Smith.
Fujitsu Australia


Attachments:

  [application/octet-stream] v1-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch (35.4K, 2-v1-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch)
  download | inline diff:
From 64b74dfc55822502990f46984d76b7fca0973cdf Mon Sep 17 00:00:00 2001
From: Peter Smith <[email protected]>
Date: Fri, 9 Jan 2026 09:28:41 +1100
Subject: [PATCH v1] Fix to make psql \d+ lists of inherits look same as other
 lists

---
 src/bin/psql/describe.c                         |  17 ++-
 src/test/regress/expected/alter_table.out       |  30 +++--
 src/test/regress/expected/constraints.out       |  42 ++++---
 src/test/regress/expected/create_table_like.out |  16 ++-
 src/test/regress/expected/foreign_data.out      |  45 ++++---
 src/test/regress/expected/generated_stored.out  |  17 ++-
 src/test/regress/expected/generated_virtual.out |  17 ++-
 src/test/regress/expected/inherit.out           | 151 +++++++++++++++---------
 src/test/regress/expected/triggers.out          |   3 +-
 src/test/regress/expected/without_overlaps.out  |   9 +-
 10 files changed, 218 insertions(+), 129 deletions(-)

diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index d3d9b84..2919618 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3482,21 +3482,18 @@ describeOneTableDetails(const char *schemaname,
 		else
 		{
 			const char *s = _("Inherits");
-			int			sw = pg_wcswidth(s, strlen(s), pset.encoding);
 
 			tuples = PQntuples(result);
 
-			for (i = 0; i < tuples; i++)
+			if (tuples > 0)
 			{
-				if (i == 0)
-					printfPQExpBuffer(&buf, "%s: %s",
-									  s, PQgetvalue(result, i, 0));
-				else
-					printfPQExpBuffer(&buf, "%*s  %s",
-									  sw, "", PQgetvalue(result, i, 0));
-				if (i < tuples - 1)
-					appendPQExpBufferChar(&buf, ',');
+				printfPQExpBuffer(&buf, "%s:", s);
+				printTableAddFooter(&cont, buf.data);
+			}
 
+			for (i = 0; i < tuples; i++)
+			{
+				printfPQExpBuffer(&buf, "    %s", PQgetvalue(result, i, 0));
 				printTableAddFooter(&cont, buf.data);
 			}
 
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index e98f1a9..900ff80 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -350,7 +350,8 @@ NOTICE:  merging constraint "con1" with inherited definition
  d      | integer |           |          | 
 Check constraints:
     "con1" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test2 RENAME CONSTRAINT con1 TO con1foo; -- fail
 ERROR:  cannot rename inherited constraint "con1"
@@ -378,7 +379,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0) NO INHERIT;
 ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con2 TO con2foo; -- ok
@@ -405,7 +407,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 PRIMARY KEY (a);
 ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok
@@ -433,7 +436,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 DROP TABLE constraint_rename_test2;
 DROP TABLE constraint_rename_test;
@@ -650,7 +654,8 @@ alter table nv_parent add check (d between '2001-01-01'::date and '2099-12-31'::
 Check constraints:
     "nv_child_2009_d_check" CHECK (d >= '01-01-2009'::date AND d <= '12-31-2009'::date)
     "nv_parent_d_check" CHECK (d >= '01-01-2001'::date AND d <= '12-31-2099'::date) NOT VALID
-Inherits: nv_parent
+Inherits:
+    nv_parent
 
 -- we leave nv_parent and children around to help test pg_dump logic
 -- Foreign key adding test with mixed types
@@ -2408,7 +2413,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  b      | double precision |           |          | 
 Check constraints:
     "test_inh_check_a_check" CHECK (a > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2439,7 +2445,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  b      | double precision |           |          | 
 Check constraints:
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2479,7 +2486,8 @@ Check constraints:
     "blocal" CHECK (b < 1000::double precision)
     "bmerged" CHECK (b > 1::double precision)
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2519,7 +2527,8 @@ Check constraints:
     "blocal" CHECK (b::double precision < 1000::double precision)
     "bmerged" CHECK (b::double precision > 1::double precision)
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -3308,7 +3317,8 @@ Typed table of type: test_type2
 --------+---------+-----------+----------+---------
  aa     | integer |           |          | 
  c      | text    |           |          | 
-Inherits: test_tbl2
+Inherits:
+    test_tbl2
 
 DROP TABLE test_tbl2_subclass, test_tbl2;
 DROP TYPE test_type2;
diff --git a/src/test/regress/expected/constraints.out b/src/test/regress/expected/constraints.out
index 5ca4fba..bb66bc7 100644
--- a/src/test/regress/expected/constraints.out
+++ b/src/test/regress/expected/constraints.out
@@ -996,7 +996,8 @@ CREATE TABLE ATACC2 () INHERITS (ATACC1);
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2;
 CREATE TABLE ATACC1 (a int);
@@ -1007,7 +1008,8 @@ CREATE TABLE ATACC2 () INHERITS (ATACC1);
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2;
 CREATE TABLE ATACC1 (a int);
@@ -1018,7 +1020,8 @@ ALTER TABLE ATACC1 ADD NOT NULL a NO INHERIT;
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 CREATE TABLE ATACC3 (PRIMARY KEY (a)) INHERITS (ATACC1);
 \d+ ATACC3
@@ -1030,7 +1033,8 @@ Indexes:
     "atacc3_pkey" PRIMARY KEY, btree (a)
 Not-null constraints:
     "atacc3_a_not_null" NOT NULL "a"
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2, ATACC3;
 -- NOT NULL NO INHERIT is not possible on partitioned tables
@@ -1058,7 +1062,8 @@ ALTER TABLE ATACC1 ADD CONSTRAINT ditto NOT NULL a;
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "ditto" NOT NULL "a" (inherited)
-Inherits: atacc2
+Inherits:
+    atacc2
 
 DROP TABLE ATACC1, ATACC2, ATACC3;
 -- Can't have two constraints with the same name
@@ -1117,7 +1122,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
 \d+ cnn_pk*
@@ -1138,7 +1144,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- As above, but create the primary key ahead of time
@@ -1164,7 +1171,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
 \d+ cnn_pk*
@@ -1185,7 +1193,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- As above, but create the primary key using a UNIQUE index
@@ -1214,7 +1223,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- Unique constraints don't give raise to not-null constraints, however.
@@ -1313,7 +1323,8 @@ Not-null constraints:
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "notnull_tbl4_a_not_null" NOT NULL "a" (inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 \d+ notnull_tbl4_cld2
                              Table "public.notnull_tbl4_cld2"
@@ -1324,7 +1335,8 @@ Indexes:
     "notnull_tbl4_cld2_pkey" PRIMARY KEY, btree (a) DEFERRABLE
 Not-null constraints:
     "notnull_tbl4_cld2_a_not_null" NOT NULL "a" (local, inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 \d+ notnull_tbl4_cld3
                              Table "public.notnull_tbl4_cld3"
@@ -1335,7 +1347,8 @@ Indexes:
     "notnull_tbl4_cld3_pkey" PRIMARY KEY, btree (a) DEFERRABLE
 Not-null constraints:
     "a_nn" NOT NULL "a" (local, inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 -- leave these tables around for pg_upgrade testing
 -- It's possible to remove a constraint from parents without affecting children
@@ -1353,7 +1366,8 @@ ALTER TABLE ONLY notnull_tbl5 ALTER b DROP NOT NULL;
 Not-null constraints:
     "ann" NOT NULL "a"
     "bnn" NOT NULL "b"
-Inherits: notnull_tbl5
+Inherits:
+    notnull_tbl5
 
 CREATE TABLE notnull_tbl6 (a int CONSTRAINT ann NOT NULL,
 	b int CONSTRAINT bnn NOT NULL, check (a > 0)) PARTITION BY LIST (a);
diff --git a/src/test/regress/expected/create_table_like.out b/src/test/regress/expected/create_table_like.out
index d3c35c1..5720d16 100644
--- a/src/test/regress/expected/create_table_like.out
+++ b/src/test/regress/expected/create_table_like.out
@@ -261,8 +261,9 @@ CREATE TABLE test_like_5c (LIKE test_like_4 INCLUDING ALL)
 Check constraints:
     "test_like_4_a_check" CHECK (a > 0)
     "test_like_5x_p_check" CHECK (p > 0)
-Inherits: test_like_5,
-          test_like_5x
+Inherits:
+    test_like_5
+    test_like_5x
 
 -- Test updating of column numbers in statistics expressions (bug #18468)
 CREATE TABLE test_like_6 (a int, c text, b text);
@@ -394,7 +395,8 @@ Check constraints:
     "ctlt1_b_check" CHECK (length(b) > 100) NOT ENFORCED
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (local, inherited)
-Inherits: ctlt1
+Inherits:
+    ctlt1
 
 SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt1_inh'::regclass;
  description 
@@ -419,8 +421,9 @@ Check constraints:
     "ctlt3_c_check" CHECK (length(c) < 7)
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (inherited)
-Inherits: ctlt1,
-          ctlt3
+Inherits:
+    ctlt1
+    ctlt3
 
 CREATE TABLE ctlt13_like (LIKE ctlt3 INCLUDING CONSTRAINTS INCLUDING INDEXES INCLUDING COMMENTS INCLUDING STORAGE) INHERITS (ctlt1);
 NOTICE:  merging column "a" with inherited definition
@@ -441,7 +444,8 @@ Check constraints:
     "ctlt3_c_check" CHECK (length(c) < 7)
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (inherited)
-Inherits: ctlt1
+Inherits:
+    ctlt1
 
 SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt13_like'::regclass;
  description 
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index 06f3028..1c25a2f 100644
--- a/src/test/regress/expected/foreign_data.out
+++ b/src/test/regress/expected/foreign_data.out
@@ -1430,7 +1430,8 @@ Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 DROP FOREIGN TABLE ft2;
 \d+ fd_pt1
@@ -1484,7 +1485,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 CREATE TABLE ct3() INHERITS(ft2);
 CREATE FOREIGN TABLE ft3 (
@@ -1507,7 +1509,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1521,7 +1524,8 @@ Child tables:
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (inherited)
-Inherits: ft2
+Inherits:
+    ft2
 
 \d+ ft3
                                        Foreign table "public.ft3"
@@ -1533,7 +1537,8 @@ Inherits: ft2
 Not-null constraints:
     "ft3_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
-Inherits: ft2
+Inherits:
+    ft2
 
 -- add attributes recursively
 ALTER TABLE fd_pt1 ADD COLUMN c4 integer;
@@ -1576,7 +1581,8 @@ Not-null constraints:
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1596,7 +1602,8 @@ Child tables:
 Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (inherited)
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
-Inherits: ft2
+Inherits:
+    ft2
 
 \d+ ft3
                                        Foreign table "public.ft3"
@@ -1614,7 +1621,8 @@ Not-null constraints:
     "ft3_c1_not_null" NOT NULL "c1" (local, inherited)
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
 Server: s0
-Inherits: ft2
+Inherits:
+    ft2
 
 -- alter attributes recursively
 ALTER TABLE fd_pt1 ALTER COLUMN c4 SET DEFAULT 0;
@@ -1664,7 +1672,8 @@ Not-null constraints:
     "fd_pt1_c6_not_null" NOT NULL "c6" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1698,7 +1707,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1747,7 +1757,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1800,7 +1811,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- drop constraints recursively
 ALTER TABLE fd_pt1 DROP CONSTRAINT fd_pt1chk1 CASCADE;
@@ -1836,7 +1848,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- VALIDATE CONSTRAINT need do nothing on foreign tables
 ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
@@ -1868,7 +1881,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- changes name of an attribute recursively
 ALTER TABLE fd_pt1 RENAME COLUMN c1 TO f1;
@@ -1904,7 +1918,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "f1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 DROP TABLE fd_pt1 CASCADE;
 NOTICE:  drop cascades to foreign table ft2
diff --git a/src/test/regress/expected/generated_stored.out b/src/test/regress/expected/generated_stored.out
index 8b7a71d..3461b6c 100644
--- a/src/test/regress/expected/generated_stored.out
+++ b/src/test/regress/expected/generated_stored.out
@@ -324,7 +324,8 @@ SELECT * FROM gtest1_1;
 --------+---------+-----------+----------+------------------------------------
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (a * 2) stored
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtest1_1 VALUES (4);
 SELECT * FROM gtest1_1;
@@ -373,7 +374,8 @@ NOTICE:  merging column "b" with inherited definition
  x      | integer |           |          |                                     | plain   |              | 
 Not-null constraints:
     "gtest1_a_not_null" NOT NULL "a" (inherited)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtestx (a, x) VALUES (11, 22);
 SELECT * FROM gtest1;
@@ -424,8 +426,9 @@ DETAIL:  User-specified column moved to the position of the inherited column.
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (x + 1) stored
  x      | integer |           |          | 
-Inherits: gtest1,
-          gtesty
+Inherits:
+    gtest1
+    gtesty
 
 -- test correct handling of GENERATED column that's only in child
 CREATE TABLE gtestp (f1 int);
@@ -1300,7 +1303,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+---------
  a      | integer |           |          | 
  b      | integer |           |          | 
-Inherits: gtest30
+Inherits:
+    gtest30
 
 DROP TABLE gtest30 CASCADE;
 NOTICE:  drop cascades to table gtest30_1
@@ -1325,7 +1329,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+------------------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2) stored
-Inherits: gtest30
+Inherits:
+    gtest30
 
 ALTER TABLE gtest30_1 ALTER COLUMN b DROP EXPRESSION;  -- error
 ERROR:  cannot drop generation expression from inherited column
diff --git a/src/test/regress/expected/generated_virtual.out b/src/test/regress/expected/generated_virtual.out
index 249e68b..e0af8de 100644
--- a/src/test/regress/expected/generated_virtual.out
+++ b/src/test/regress/expected/generated_virtual.out
@@ -318,7 +318,8 @@ SELECT * FROM gtest1_1;
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtest1_1 VALUES (4);
 SELECT * FROM gtest1_1;
@@ -367,7 +368,8 @@ NOTICE:  merging column "b" with inherited definition
  x      | integer |           |          |                              | plain   |              | 
 Not-null constraints:
     "gtest1_a_not_null" NOT NULL "a" (inherited)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtestx (a, x) VALUES (11, 22);
 SELECT * FROM gtest1;
@@ -418,8 +420,9 @@ DETAIL:  User-specified column moved to the position of the inherited column.
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (x + 1)
  x      | integer |           |          | 
-Inherits: gtest1,
-          gtesty
+Inherits:
+    gtest1
+    gtesty
 
 -- test correct handling of GENERATED column that's only in child
 CREATE TABLE gtestp (f1 int);
@@ -1270,7 +1273,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest30
+Inherits:
+    gtest30
 
 DROP TABLE gtest30 CASCADE;
 NOTICE:  drop cascades to table gtest30_1
@@ -1295,7 +1299,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest30
+Inherits:
+    gtest30
 
 ALTER TABLE gtest30_1 ALTER COLUMN b DROP EXPRESSION;  -- error
 ERROR:  cannot drop generation expression from inherited column
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 500c857..59c9a3f 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -795,7 +795,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  ff1    | integer |           |          | 
 Check constraints:
     "p2chk" CHECK (ff1 > 10)
-Inherits: p1
+Inherits:
+    p1
 
 -- Test that child does not override inheritable constraints of the parent
 create table c2 (constraint p2chk check (ff1 > 10) no inherit) inherits (p1);	--fails
@@ -990,8 +991,9 @@ create table c2(f3 int) inherits(p1,p2);
  f3     | integer |           |          | 
 Check constraints:
     "p2_f2_check" CHECK (f2 > 0)
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
 create table c3 (f4 int) inherits(c1,c2);
 NOTICE:  merging multiple inherited definitions of column "f1"
@@ -1007,8 +1009,9 @@ NOTICE:  merging multiple inherited definitions of column "f3"
  f4     | integer |           |          | 
 Check constraints:
     "p2_f2_check" CHECK (f2 > 0)
-Inherits: c1,
-          c2
+Inherits:
+    c1
+    c2
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -1029,7 +1032,8 @@ alter table pp1 add column a1 int check (a1 > 0);
  a1     | integer |           |          | 
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
-Inherits: pp1
+Inherits:
+    pp1
 
 create table cc2(f4 float) inherits(pp1,cc1);
 NOTICE:  merging multiple inherited definitions of column "f1"
@@ -1045,8 +1049,9 @@ NOTICE:  merging multiple inherited definitions of column "a1"
  f4     | double precision |           |          | 
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 alter table pp1 add column a2 int check (a2 > 0);
 NOTICE:  merging definition of column "a2" for child "cc2"
@@ -1064,8 +1069,9 @@ NOTICE:  merging constraint "pp1_a2_check" with inherited definition
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
     "pp1_a2_check" CHECK (a2 > 0)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 drop table pp1 cascade;
 NOTICE:  drop cascades to 2 other objects
@@ -1090,8 +1096,9 @@ ALTER TABLE inhts RENAME d TO dd;
  b      | integer |           |          |         | plain   |              | 
  c      | integer |           |          |         | plain   |              | 
  dd     | integer |           |          |         | plain   |              | 
-Inherits: inht1,
-          inhs1
+Inherits:
+    inht1
+    inhs1
 
 DROP TABLE inhts;
 -- Test for adding a column to a parent table with complex inheritance
@@ -1120,9 +1127,10 @@ Child tables:
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  i      | integer |           |          |         | plain   |              | 
  j      | bigint  |           |          | 1       | plain   |              | 
-Inherits: inhta,
-          inhtb,
-          inhtc
+Inherits:
+    inhta
+    inhtb
+    inhtc
 
 DROP TABLE inhta, inhtb, inhtc, inhtd;
 -- Test for renaming in diamond inheritance
@@ -1141,8 +1149,9 @@ ALTER TABLE inht1 RENAME aa TO aaa;
  x      | integer |           |          |         | plain   |              | 
  y      | integer |           |          |         | plain   |              | 
  z      | integer |           |          |         | plain   |              | 
-Inherits: inht2,
-          inht3
+Inherits:
+    inht2
+    inht3
 
 CREATE TABLE inhts (d int) INHERITS (inht2, inhs1);
 NOTICE:  merging multiple inherited definitions of column "b"
@@ -1158,8 +1167,9 @@ ERROR:  cannot rename inherited column "b"
  x      | integer |           |          |         | plain   |              | 
  c      | integer |           |          |         | plain   |              | 
  d      | integer |           |          |         | plain   |              | 
-Inherits: inht2,
-          inhs1
+Inherits:
+    inht2
+    inhs1
 
 WITH RECURSIVE r AS (
   SELECT 'inht1'::regclass AS inhrelid
@@ -1226,7 +1236,8 @@ Child tables:
  id     | integer           |           |          |         | plain    |              | 
  val1   | character varying |           |          |         | extended |              | 
  val2   | integer           |           |          |         | plain    |              | 
-Inherits: test_constraints
+Inherits:
+    test_constraints
 
 DROP TABLE test_constraints_inh;
 DROP TABLE test_constraints;
@@ -1259,7 +1270,8 @@ Child tables:
  Column |  Type  | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+--------+-----------+----------+---------+---------+--------------+-------------
  c      | circle |           |          |         | plain   |              | 
-Inherits: test_ex_constraints
+Inherits:
+    test_ex_constraints
 
 DROP TABLE test_ex_constraints_inh;
 DROP TABLE test_ex_constraints;
@@ -1303,7 +1315,8 @@ Child tables:
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  id1    | integer |           |          |         | plain   |              | 
-Inherits: test_foreign_constraints
+Inherits:
+    test_foreign_constraints
 
 DROP TABLE test_foreign_constraints_inh;
 DROP TABLE test_foreign_constraints;
@@ -1465,7 +1478,8 @@ alter table p1 drop constraint f1_pos;
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1
+Inherits:
+    p1
 
 drop table p1 cascade;
 NOTICE:  drop cascades to table p1_c1
@@ -1485,8 +1499,9 @@ alter table p1 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
               Table "public.p1p2_c2"
  Column |  Type   | Collation | Nullable | Default 
@@ -1494,8 +1509,9 @@ Inherits: p1,
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
 drop table p1, p2 cascade;
 NOTICE:  drop cascades to 2 other objects
@@ -1513,8 +1529,9 @@ NOTICE:  merging multiple inherited definitions of column "f1"
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1_c1,
-          p1_c2
+Inherits:
+    p1_c1
+    p1_c2
 
 alter table p1 drop constraint f1_pos;
 \d p1_c1c2
@@ -1522,8 +1539,9 @@ alter table p1 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1_c1,
-          p1_c2
+Inherits:
+    p1_c1
+    p1_c2
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -1548,9 +1566,10 @@ alter table p1_c2 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1_c1,
-          p1_c2,
-          p1
+Inherits:
+    p1_c1
+    p1_c2
+    p1
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -2202,9 +2221,10 @@ alter table pp1 alter f1 set not null;
  f4     | double precision |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1,
-          cc1,
-          cc2
+Inherits:
+    pp1
+    cc1
+    cc2
 
 alter table cc3 no inherit pp1;
 alter table cc3 no inherit cc1;
@@ -2234,7 +2254,8 @@ alter table cc1 add column a2 int constraint nn not null;
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2250,8 +2271,9 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 alter table pp1 alter column f1 set not null;
 \d+ pp1
@@ -2276,7 +2298,8 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2292,8 +2315,9 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 -- cannot create table with inconsistent NO INHERIT constraint
 create table cc3 (a2 int not null no inherit) inherits (cc1);
@@ -2320,7 +2344,8 @@ alter table cc1 alter column a2 drop not null;
  a2     | integer |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2338,8 +2363,9 @@ ERROR:  cannot drop inherited constraint "pp1_f1_not_null" of relation "cc2"
  a2     | integer          |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 -- remove from cc1, should fail again
 alter table cc1 alter column f1 drop not null;
@@ -2405,8 +2431,9 @@ alter table inh_pp1 alter column f1 drop not null;
  f2     | text             |           |          |         | extended |              | 
  f3     | integer          |           |          |         | plain    |              | 
  f4     | double precision |           |          |         | plain    |              | 
-Inherits: inh_pp1,
-          inh_cc1
+Inherits:
+    inh_pp1
+    inh_cc1
 
 drop table inh_pp1, inh_cc1, inh_cc2;
 -- Test a not-null addition that must walk down the hierarchy
@@ -2430,8 +2457,9 @@ create table inh_child1 () inherits (inh_parent1, inh_parent2);
 Not-null constraints:
     "nn" NOT NULL "a" (inherited)
     "inh_child1_b_not_null" NOT NULL "b" (inherited)
-Inherits: inh_parent1,
-          inh_parent2
+Inherits:
+    inh_parent1
+    inh_parent2
 
 create table inh_child2 (constraint foo not null a) inherits (inh_parent1, inh_parent2);
 alter table inh_child2 no inherit inh_parent2;
@@ -2444,7 +2472,8 @@ alter table inh_child2 no inherit inh_parent2;
 Not-null constraints:
     "foo" NOT NULL "a" (local, inherited)
     "nn" NOT NULL "b"
-Inherits: inh_parent1
+Inherits:
+    inh_parent1
 
 drop table inh_parent1, inh_parent2, inh_child1, inh_child2;
 -- Test multiple parents with overlapping primary keys
@@ -2483,8 +2512,9 @@ Not-null constraints:
     "inh_parent1_a_not_null" NOT NULL "a" (inherited)
     "inh_parent1_b_not_null" NOT NULL "b" (inherited)
     "inh_parent2_d_not_null" NOT NULL "d" (inherited)
-Inherits: inh_parent1,
-          inh_parent2
+Inherits:
+    inh_parent1
+    inh_parent2
 
 drop table inh_parent1, inh_parent2, inh_child;
 -- NOT NULL NO INHERIT
@@ -2508,13 +2538,15 @@ select conrelid::regclass, conname, contype, conkey,
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: inh_nn_parent
+Inherits:
+    inh_nn_parent
 
                                Table "public.inh_nn_child2"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: inh_nn_parent
+Inherits:
+    inh_nn_parent
 
                                Table "public.inh_nn_parent"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -2593,7 +2625,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_parent
+Inherits:
+    inh_parent
 Child tables:
     inh_child2
 
@@ -2604,7 +2637,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child2_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_child1
+Inherits:
+    inh_child1
 
 select conrelid::regclass, conname, contype, coninhcount, conislocal
  from pg_constraint where contype = 'n' and
@@ -2649,7 +2683,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child2_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_child1
+Inherits:
+    inh_child1
 
 select conrelid::regclass, conname, contype, coninhcount, conislocal
  from pg_constraint where contype = 'n' and
diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out
index 1eb8fba..296f414 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -3558,7 +3558,8 @@ alter trigger parenttrig on parent rename to anothertrig;
  a      | integer |           |          |         | plain   |              | 
 Triggers:
     parenttrig AFTER INSERT ON child FOR EACH ROW EXECUTE FUNCTION f()
-Inherits: parent
+Inherits:
+    parent
 
 drop table parent, child;
 drop function f();
diff --git a/src/test/regress/expected/without_overlaps.out b/src/test/regress/expected/without_overlaps.out
index f3144bd..717e379 100644
--- a/src/test/regress/expected/without_overlaps.out
+++ b/src/test/regress/expected/without_overlaps.out
@@ -80,7 +80,8 @@ CREATE TABLE temporal_rng2 () INHERITS (temporal_rng);
 ----------+-----------+-----------+----------+---------
  id       | int4range |           | not null | 
  valid_at | daterange |           | not null | 
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng2;
 DROP TABLE temporal_rng;
@@ -100,7 +101,8 @@ CREATE TABLE temporal_rng2 (
  valid_at | daterange |           | not null | 
 Indexes:
     "temporal_rng_pk" PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng CASCADE;
 NOTICE:  drop cascades to table temporal_rng2
@@ -120,7 +122,8 @@ ALTER TABLE temporal_rng2
  valid_at | daterange |           | not null | 
 Indexes:
     "temporal_rng_pk" PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng2;
 DROP TABLE temporal_rng;
-- 
1.8.3.1



  [application/octet-stream] v1-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch (29.0K, 3-v1-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch)
  download | inline diff:
From 441ffb23fa9e78ca7c2d8f55936adae614be7ff5 Mon Sep 17 00:00:00 2001
From: Peter Smith <[email protected]>
Date: Fri, 9 Jan 2026 09:03:48 +1100
Subject: [PATCH v1] Fix to make psql \d+ lists of partitions look same as
 other lists

---
 src/bin/psql/describe.c                        | 16 +++----
 src/test/regress/expected/alter_table.out      |  6 ++-
 src/test/regress/expected/constraints.out      | 22 +++++----
 src/test/regress/expected/create_table.out     | 17 ++++---
 src/test/regress/expected/foreign_data.out     | 64 +++++++++++++++++---------
 src/test/regress/expected/inherit.out          | 58 ++++++++++++++---------
 src/test/regress/expected/insert.out           | 32 +++++++------
 src/test/regress/expected/partition_split.out  | 23 +++++----
 src/test/regress/expected/replica_identity.out |  6 ++-
 src/test/regress/expected/rowsecurity.out      |  7 +--
 src/test/regress/expected/tablespace.out       | 10 ++--
 11 files changed, 157 insertions(+), 104 deletions(-)

diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 3584c4e..d3d9b84 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3565,18 +3565,18 @@ describeOneTableDetails(const char *schemaname,
 		{
 			/* display the list of child tables */
 			const char *ct = is_partitioned ? _("Partitions") : _("Child tables");
-			int			ctw = pg_wcswidth(ct, strlen(ct), pset.encoding);
+
+			if (tuples > 0)
+			{
+				printfPQExpBuffer(&buf, "%s:", ct);
+				printTableAddFooter(&cont, buf.data);
+			}
 
 			for (i = 0; i < tuples; i++)
 			{
 				char		child_relkind = *PQgetvalue(result, i, 1);
 
-				if (i == 0)
-					printfPQExpBuffer(&buf, "%s: %s",
-									  ct, PQgetvalue(result, i, 0));
-				else
-					printfPQExpBuffer(&buf, "%*s  %s",
-									  ctw, "", PQgetvalue(result, i, 0));
+				printfPQExpBuffer(&buf, "    %s", PQgetvalue(result, i, 0));
 				if (!PQgetisnull(result, i, 3))
 					appendPQExpBuffer(&buf, " %s", PQgetvalue(result, i, 3));
 				if (child_relkind == RELKIND_PARTITIONED_TABLE ||
@@ -3586,8 +3586,6 @@ describeOneTableDetails(const char *schemaname,
 					appendPQExpBufferStr(&buf, ", FOREIGN");
 				if (strcmp(PQgetvalue(result, i, 2), "t") == 0)
 					appendPQExpBufferStr(&buf, " (DETACH PENDING)");
-				if (i < tuples - 1)
-					appendPQExpBufferChar(&buf, ',');
 
 				printTableAddFooter(&cont, buf.data);
 			}
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index ac1a734..e98f1a9 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -1236,7 +1236,8 @@ primary key, btree, for table "public.atnnpart1"
 Partition key: LIST (id)
 Not-null constraints:
     "dummy_constr" NOT NULL "id" NOT VALID
-Partitions: atnnpart1 FOR VALUES IN (1)
+Partitions:
+    atnnpart1 FOR VALUES IN (1)
 
 BEGIN;
 ALTER TABLE atnnparted VALIDATE CONSTRAINT dummy_constr;
@@ -1267,7 +1268,8 @@ primary key, btree, for table "public.atnnpart1"
 Partition key: LIST (id)
 Not-null constraints:
     "dummy_constr" NOT NULL "id"
-Partitions: atnnpart1 FOR VALUES IN (1)
+Partitions:
+    atnnpart1 FOR VALUES IN (1)
 
 ROLLBACK;
 -- leave a table in this state for the pg_upgrade test
diff --git a/src/test/regress/expected/constraints.out b/src/test/regress/expected/constraints.out
index 1bbf59c..5ca4fba 100644
--- a/src/test/regress/expected/constraints.out
+++ b/src/test/regress/expected/constraints.out
@@ -1107,7 +1107,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1127,7 +1128,8 @@ ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1152,7 +1154,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1172,7 +1175,8 @@ ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1200,7 +1204,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1268,9 +1273,10 @@ Indexes:
     "notnull_tbl4_pkey" PRIMARY KEY, btree (a) DEFERRABLE INITIALLY DEFERRED
 Not-null constraints:
     "notnull_tbl4_a_not_null" NOT NULL "a"
-Child tables: notnull_tbl4_cld,
-              notnull_tbl4_cld2,
-              notnull_tbl4_cld3
+Child tables:
+    notnull_tbl4_cld
+    notnull_tbl4_cld2
+    notnull_tbl4_cld3
 
 \d+ notnull_tbl4_lk
                               Table "public.notnull_tbl4_lk"
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index 029beb2..f5b4e93 100644
--- a/src/test/regress/expected/create_table.out
+++ b/src/test/regress/expected/create_table.out
@@ -425,10 +425,11 @@ CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
 Partition key: LIST (a)
-Partitions: part_null FOR VALUES IN (NULL),
-            part_p1 FOR VALUES IN (1),
-            part_p2 FOR VALUES IN (2),
-            part_p3 FOR VALUES IN (3)
+Partitions:
+    part_null FOR VALUES IN (NULL)
+    part_p1 FOR VALUES IN (1)
+    part_p2 FOR VALUES IN (2)
+    part_p3 FOR VALUES IN (3)
 
 -- forbidden expressions for partition bound with list partitioned table
 CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename);
@@ -893,7 +894,8 @@ Partition constraint: ((a IS NOT NULL) AND (a = 'c'::text))
 Partition key: RANGE (b)
 Not-null constraints:
     "part_c_b_not_null" NOT NULL "b" (local, inherited)
-Partitions: part_c_1_10 FOR VALUES FROM (1) TO (10)
+Partitions:
+    part_c_1_10 FOR VALUES FROM (1) TO (10)
 
 -- a level-2 partition's constraint will include the parent's expressions
 \d+ part_c_1_10
@@ -1038,8 +1040,9 @@ create table boolspart_f partition of boolspart for values in (false);
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | boolean |           |          |         | plain   |              | 
 Partition key: LIST (a)
-Partitions: boolspart_f FOR VALUES IN (false),
-            boolspart_t FOR VALUES IN (true)
+Partitions:
+    boolspart_f FOR VALUES IN (false)
+    boolspart_t FOR VALUES IN (true)
 
 drop table boolspart;
 -- partitions mixing temporary and permanent relations
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index cce49e5..06f3028 100644
--- a/src/test/regress/expected/foreign_data.out
+++ b/src/test/regress/expected/foreign_data.out
@@ -1416,7 +1416,8 @@ CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1)
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1469,7 +1470,8 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1506,8 +1508,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 \d+ ct3
                                     Table "public.ct3"
@@ -1553,7 +1556,8 @@ ALTER TABLE fd_pt1 ADD COLUMN c8 integer;
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
     "fd_pt1_c7_not_null" NOT NULL "c7"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1573,8 +1577,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 \d+ ct3
                                     Table "public.ct3"
@@ -1639,7 +1644,8 @@ ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
     "fd_pt1_c6_not_null" NOT NULL "c6"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1659,8 +1665,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 -- drop attributes recursively
 ALTER TABLE fd_pt1 DROP COLUMN c4;
@@ -1677,7 +1684,8 @@ ALTER TABLE fd_pt1 DROP COLUMN c8;
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1691,8 +1699,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 -- add constraints recursively
 ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
@@ -1722,7 +1731,8 @@ Check constraints:
     "fd_pt1chk2" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1738,8 +1748,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 DROP FOREIGN TABLE ft2; -- ERROR
 ERROR:  cannot drop foreign table ft2 because other objects depend on it
@@ -1773,7 +1784,8 @@ Check constraints:
     "fd_pt1chk2" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1807,7 +1819,8 @@ Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1838,7 +1851,8 @@ Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1873,7 +1887,8 @@ Check constraints:
     "f2_check" CHECK (f2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "f1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1935,7 +1950,8 @@ CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR VALUES IN (1)
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -2017,7 +2033,8 @@ ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1);
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -2049,7 +2066,8 @@ ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> '');
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 0490a74..500c857 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -1110,8 +1110,9 @@ NOTICE:  merging definition of column "j" for child "inhtd"
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  i      | integer |           |          |         | plain   |              | 
  j      | bigint  |           |          | 1       | plain   |              | 
-Child tables: inhtb,
-              inhtd
+Child tables:
+    inhtb
+    inhtd
 
 \d+ inhtd
                                    Table "public.inhtd"
@@ -1204,7 +1205,8 @@ CREATE TABLE test_constraints_inh () INHERITS (test_constraints);
  val2   | integer           |           |          |         | plain    |              | 
 Indexes:
     "test_constraints_val1_val2_key" UNIQUE CONSTRAINT, btree (val1, val2)
-Child tables: test_constraints_inh
+Child tables:
+    test_constraints_inh
 
 ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key;
 \d+ test_constraints
@@ -1214,7 +1216,8 @@ ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key
  id     | integer           |           |          |         | plain    |              | 
  val1   | character varying |           |          |         | extended |              | 
  val2   | integer           |           |          |         | plain    |              | 
-Child tables: test_constraints_inh
+Child tables:
+    test_constraints_inh
 
 \d+ test_constraints_inh
                                  Table "public.test_constraints_inh"
@@ -1239,7 +1242,8 @@ CREATE TABLE test_ex_constraints_inh () INHERITS (test_ex_constraints);
  c      | circle |           |          |         | plain   |              | 
 Indexes:
     "test_ex_constraints_c_excl" EXCLUDE USING gist (c WITH &&)
-Child tables: test_ex_constraints_inh
+Child tables:
+    test_ex_constraints_inh
 
 ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
 \d+ test_ex_constraints
@@ -1247,7 +1251,8 @@ ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
  Column |  Type  | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+--------+-----------+----------+---------+---------+--------------+-------------
  c      | circle |           |          |         | plain   |              | 
-Child tables: test_ex_constraints_inh
+Child tables:
+    test_ex_constraints_inh
 
 \d+ test_ex_constraints_inh
                          Table "public.test_ex_constraints_inh"
@@ -1281,7 +1286,8 @@ Not-null constraints:
  id1    | integer |           |          |         | plain   |              | 
 Foreign-key constraints:
     "test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id)
-Child tables: test_foreign_constraints_inh
+Child tables:
+    test_foreign_constraints_inh
 
 ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id1_fkey;
 \d+ test_foreign_constraints
@@ -1289,7 +1295,8 @@ ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  id1    | integer |           |          |         | plain   |              | 
-Child tables: test_foreign_constraints_inh
+Child tables:
+    test_foreign_constraints_inh
 
 \d+ test_foreign_constraints_inh
                        Table "public.test_foreign_constraints_inh"
@@ -2228,7 +2235,8 @@ Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 \d+ cc2
                                          Table "public.cc2"
@@ -2253,8 +2261,9 @@ alter table pp1 alter column f1 set not null;
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1"
-Child tables: cc1,
-              cc2
+Child tables:
+    cc1
+    cc2
 
 \d+ cc1
                                     Table "public.cc1"
@@ -2268,7 +2277,8 @@ Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 \d+ cc2
                                          Table "public.cc2"
@@ -2311,7 +2321,8 @@ alter table cc1 alter column a2 drop not null;
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 -- same for cc2
 alter table cc2 alter column f1 drop not null;
@@ -2340,8 +2351,9 @@ alter table pp1 alter column f1 drop not null;
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  f1     | integer |           |          |         | plain   |              | 
-Child tables: cc1,
-              cc2
+Child tables:
+    cc1
+    cc2
 
 alter table pp1 add primary key (f1);
 -- Leave these tables around, for pg_upgrade testing
@@ -2510,8 +2522,9 @@ Inherits: inh_nn_parent
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_nn_parent_a_not_null" NOT NULL "a" NO INHERIT
-Child tables: inh_nn_child,
-              inh_nn_child2
+Child tables:
+    inh_nn_child
+    inh_nn_child2
 
 drop table inh_nn_parent, inh_nn_child, inh_nn_child2;
 CREATE TABLE inh_nn_parent (a int, NOT NULL a NO INHERIT);
@@ -2570,7 +2583,8 @@ alter table inh_parent alter column f1 set not null;
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_parent_f1_not_null" NOT NULL "f1"
-Child tables: inh_child1
+Child tables:
+    inh_child1
 
 \d+ inh_child1
                                 Table "public.inh_child1"
@@ -2580,7 +2594,8 @@ Child tables: inh_child1
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1" (local, inherited)
 Inherits: inh_parent
-Child tables: inh_child2
+Child tables:
+    inh_child2
 
 \d+ inh_child2
                                 Table "public.inh_child2"
@@ -2623,8 +2638,9 @@ Not-null constraints:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1"
-Child tables: inh_child2,
-              inh_child3
+Child tables:
+    inh_child2
+    inh_child3
 
 \d+ inh_child2
                                 Table "public.inh_child2"
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index cf4b522..75b8de7 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -567,13 +567,14 @@ from hash_parted order by part;
  a      | text    |           |          |         | extended |              | 
  b      | integer |           |          |         | plain    |              | 
 Partition key: LIST (lower(a))
-Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
-            part_cc_dd FOR VALUES IN ('cc', 'dd'),
-            part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
-            part_gg FOR VALUES IN ('gg'), PARTITIONED,
-            part_null FOR VALUES IN (NULL),
-            part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED,
-            part_default DEFAULT, PARTITIONED
+Partitions:
+    part_aa_bb FOR VALUES IN ('aa', 'bb')
+    part_cc_dd FOR VALUES IN ('cc', 'dd')
+    part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED
+    part_gg FOR VALUES IN ('gg'), PARTITIONED
+    part_null FOR VALUES IN (NULL)
+    part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED
+    part_default DEFAULT, PARTITIONED
 
 -- cleanup
 drop table range_parted, list_parted;
@@ -972,14 +973,15 @@ create table mcrparted8_ge_d partition of mcrparted for values from ('d', minval
  a      | text    |           |          |         | extended |              | 
  b      | integer |           |          |         | plain    |              | 
 Partition key: RANGE (a, b)
-Partitions: mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVALUE),
-            mcrparted2_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE),
-            mcrparted3_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE),
-            mcrparted4_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0),
-            mcrparted5_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10),
-            mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE),
-            mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE),
-            mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
+Partitions:
+    mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVALUE)
+    mcrparted2_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE)
+    mcrparted3_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE)
+    mcrparted4_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0)
+    mcrparted5_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10)
+    mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE)
+    mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE)
+    mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
 
 \d+ mcrparted1_lt_b
                               Table "public.mcrparted1_lt_b"
diff --git a/src/test/regress/expected/partition_split.out b/src/test/regress/expected/partition_split.out
index 4004efe..13ca733 100644
--- a/src/test/regress/expected/partition_split.out
+++ b/src/test/regress/expected/partition_split.out
@@ -138,10 +138,11 @@ SET search_path = partition_split_schema, public;
  salesperson_id | integer |           |          |         | plain   |              | 
  sales_date     | date    |           |          |         | plain   |              | 
 Partition key: RANGE (sales_date)
-Partitions: partition_split_schema2.sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022'),
-            partition_split_schema2.sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022'),
-            partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022'),
-            sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
+Partitions:
+    partition_split_schema2.sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022')
+    partition_split_schema2.sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022')
+    partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022')
+    sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
 
 DROP TABLE sales_range;
 DROP TABLE sales_others;
@@ -242,11 +243,12 @@ ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
  sales_amount     | integer               |           |          |         | plain    |              | 
  sales_date       | date                  |           |          |         | plain    |              | 
 Partition key: RANGE (sales_date)
-Partitions: partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022'),
-            sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022'),
-            sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022'),
-            sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022'),
-            sales_others DEFAULT
+Partitions:
+    partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022')
+    sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022')
+    sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022')
+    sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
+    sales_others DEFAULT
 
 SELECT tableoid::regclass, * FROM sales_range ORDER BY tableoid::regclass::text COLLATE "C", salesperson_id;
                tableoid                | salesperson_id | salesperson_name | sales_amount | sales_date 
@@ -1317,7 +1319,8 @@ CREATE TABLE t_bigint_default PARTITION OF t_bigint DEFAULT;
  j      | integer |           |          | 101                                   | plain   |              | 
  k      | integer |           |          | generated always as ((b + 10)) stored | plain   |              | 
 Partition key: RANGE (b)
-Partitions: t_bigint_default DEFAULT
+Partitions:
+    t_bigint_default DEFAULT
 
 \d+ t_bigint_default
                                     Table "partition_split_schema.t_bigint_default"
diff --git a/src/test/regress/expected/replica_identity.out b/src/test/regress/expected/replica_identity.out
index b9b8dde..336b04f 100644
--- a/src/test/regress/expected/replica_identity.out
+++ b/src/test/regress/expected/replica_identity.out
@@ -262,7 +262,8 @@ Indexes:
     "test_replica_identity4_pkey" PRIMARY KEY, btree (id) INVALID REPLICA IDENTITY
 Not-null constraints:
     "test_replica_identity4_id_not_null" NOT NULL "id"
-Partitions: test_replica_identity4_1 FOR VALUES IN (1)
+Partitions:
+    test_replica_identity4_1 FOR VALUES IN (1)
 
 ALTER INDEX test_replica_identity4_pkey
   ATTACH PARTITION test_replica_identity4_1_pkey;
@@ -276,7 +277,8 @@ Indexes:
     "test_replica_identity4_pkey" PRIMARY KEY, btree (id) REPLICA IDENTITY
 Not-null constraints:
     "test_replica_identity4_id_not_null" NOT NULL "id"
-Partitions: test_replica_identity4_1 FOR VALUES IN (1)
+Partitions:
+    test_replica_identity4_1 FOR VALUES IN (1)
 
 -- Dropping the primary key is not allowed if that would leave the replica
 -- identity as nullable
diff --git a/src/test/regress/expected/rowsecurity.out b/src/test/regress/expected/rowsecurity.out
index c958ef4..3fdc45d 100644
--- a/src/test/regress/expected/rowsecurity.out
+++ b/src/test/regress/expected/rowsecurity.out
@@ -1216,9 +1216,10 @@ Policies:
       USING ((cid < 55))
 Not-null constraints:
     "part_document_dlevel_not_null" NOT NULL "dlevel"
-Partitions: part_document_fiction FOR VALUES FROM (11) TO (12),
-            part_document_nonfiction FOR VALUES FROM (99) TO (100),
-            part_document_satire FOR VALUES FROM (55) TO (56)
+Partitions:
+    part_document_fiction FOR VALUES FROM (11) TO (12)
+    part_document_nonfiction FOR VALUES FROM (99) TO (100)
+    part_document_satire FOR VALUES FROM (55) TO (56)
 
 SELECT * FROM pg_policies WHERE schemaname = 'regress_rls_schema' AND tablename like '%part_document%' ORDER BY policyname;
      schemaname     |   tablename   | policyname | permissive  |       roles        | cmd |                    qual                    | with_check 
diff --git a/src/test/regress/expected/tablespace.out b/src/test/regress/expected/tablespace.out
index a90e39e..97b6cb7 100644
--- a/src/test/regress/expected/tablespace.out
+++ b/src/test/regress/expected/tablespace.out
@@ -355,8 +355,9 @@ Number of partitions: 2 (Use \d+ to list them.)
 Partition key: LIST (a)
 Indexes:
     "part_a_idx" btree (a), tablespace "regress_tblspace"
-Partitions: testschema.part1 FOR VALUES IN (1),
-            testschema.part2 FOR VALUES IN (2)
+Partitions:
+    testschema.part1 FOR VALUES IN (1)
+    testschema.part2 FOR VALUES IN (2)
 
 \d testschema.part1
              Table "testschema.part1"
@@ -392,8 +393,9 @@ Tablespace: "regress_tblspace"
 --------+---------+------+------------+---------+--------------
  a      | integer | yes  | a          | plain   | 
 btree, for table "testschema.part"
-Partitions: testschema.part1_a_idx,
-            testschema.part2_a_idx
+Partitions:
+    testschema.part1_a_idx
+    testschema.part2_a_idx
 Tablespace: "regress_tblspace"
 
 -- partitioned rels cannot specify the default tablespace.  These fail:
-- 
1.8.3.1



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-09 00:45  Chao Li <[email protected]>
  parent: Peter Smith <[email protected]>
  2 siblings, 0 replies; 13+ messages in thread

From: Chao Li @ 2026-01-09 00:45 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>



> On Jan 9, 2026, at 06:47, Peter Smith <[email protected]> wrote:
> 
> Hi.
> 
> I recently saw that the psql \d+ lists for "Partitions:" are not
> aligned in quite the same way as other lists ("Publications:" etc)
> because they use indents and line breaks differently. e.g. See below:
> 
> test_pub=# \d+ part1
>                                    Partitioned table "public.part1"
> Column |  Type   | Collation | Nullable | Default | Storage |
> Compression | Stats target | Description
> --------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
> a      | integer |           |          |         | plain   |
>    |              |
> Partition of: t1 FOR VALUES FROM (0) TO (50)
> Partition constraint: ((a IS NOT NULL) AND (a >= 0) AND (a < 50))
> Partition key: RANGE (a)
> Publications:
>    "pub1"
>    "pub2"
>    "pub_only"
> Partitions: part1_1 FOR VALUES FROM (0) TO (25), PARTITIONED,
>            part1_2 FOR VALUES FROM (25) TO (50)
> 
> ~~~
> 
> PSA v1
> 0001 - Fix (common code) lists for "Partitions:" and "Child tables:"
> 0002 - Fix list for "Inherits:" in the same way
> 
> ~~~
> 
> The *patched* result for the same example now looks like below. Notice
> that in passing I also removed the comma separators, which are not
> present in the other footer lists.
> 
> test_pub=# \d+ part1
>                                    Partitioned table "public.part1"
> Column |  Type   | Collation | Nullable | Default | Storage |
> Compression | Stats target | Description
> --------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
> a      | integer |           |          |         | plain   |
>    |              |
> Partition of: t1 FOR VALUES FROM (0) TO (50)
> Partition constraint: ((a IS NOT NULL) AND (a >= 0) AND (a < 50))
> Partition key: RANGE (a)
> Publications:
>    "pub1"
>    "pub2"
>    "pub_only"
> Partitions:
>    part1_1 FOR VALUES FROM (0) TO (25), PARTITIONED
>    part1_2 FOR VALUES FROM (25) TO (50)
> 
> ======
> Kind Regards,
> Peter Smith.
> Fujitsu Australia
> <v1-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v1-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>


This is a simple change, but makes sense to me, making the display looking better.

The code change is straightforward and LGTM.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/










^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-20 22:24  Peter Smith <[email protected]>
  parent: Peter Smith <[email protected]>
  2 siblings, 0 replies; 13+ messages in thread

From: Peter Smith @ 2026-01-20 22:24 UTC (permalink / raw)
  To: PostgreSQL Hackers <[email protected]>

Ping. This small patch had received a couple of LGTM, but then the
thread went silent for nearly 2 weeks.

I've created a new CF entry [1] marked "ready for committer". Is there
anything else I can do to help get this one over the line?

======
[1] https://commitfest.postgresql.org/patch/6413/

Kind Regards,
Peter Smith.
Fujitsu Australia






^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-21 02:58  Peter Smith <[email protected]>
  parent: Peter Smith <[email protected]>
  2 siblings, 1 reply; 13+ messages in thread

From: Peter Smith @ 2026-01-21 02:58 UTC (permalink / raw)
  To: PostgreSQL Hackers <[email protected]>

A rebase was needed for some more test expected output changes.

PSA v2.

======
Kind Regards,
Peter Smith.
Fujitsu Australia


Attachments:

  [application/octet-stream] v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch (35.4K, 2-v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch)
  download | inline diff:
From 7d6e3ce1372f123365d9fb08f22c3c7a728bcfc1 Mon Sep 17 00:00:00 2001
From: Peter Smith <[email protected]>
Date: Wed, 21 Jan 2026 13:53:09 +1100
Subject: [PATCH v2] Fix to make psql \d+ lists of inherits look same as other
 lists

---
 src/bin/psql/describe.c                         |  17 ++-
 src/test/regress/expected/alter_table.out       |  30 +++--
 src/test/regress/expected/constraints.out       |  42 ++++---
 src/test/regress/expected/create_table_like.out |  16 ++-
 src/test/regress/expected/foreign_data.out      |  45 ++++---
 src/test/regress/expected/generated_stored.out  |  17 ++-
 src/test/regress/expected/generated_virtual.out |  17 ++-
 src/test/regress/expected/inherit.out           | 151 +++++++++++++++---------
 src/test/regress/expected/triggers.out          |   3 +-
 src/test/regress/expected/without_overlaps.out  |   9 +-
 10 files changed, 218 insertions(+), 129 deletions(-)

diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index d3d9b84..2919618 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3482,21 +3482,18 @@ describeOneTableDetails(const char *schemaname,
 		else
 		{
 			const char *s = _("Inherits");
-			int			sw = pg_wcswidth(s, strlen(s), pset.encoding);
 
 			tuples = PQntuples(result);
 
-			for (i = 0; i < tuples; i++)
+			if (tuples > 0)
 			{
-				if (i == 0)
-					printfPQExpBuffer(&buf, "%s: %s",
-									  s, PQgetvalue(result, i, 0));
-				else
-					printfPQExpBuffer(&buf, "%*s  %s",
-									  sw, "", PQgetvalue(result, i, 0));
-				if (i < tuples - 1)
-					appendPQExpBufferChar(&buf, ',');
+				printfPQExpBuffer(&buf, "%s:", s);
+				printTableAddFooter(&cont, buf.data);
+			}
 
+			for (i = 0; i < tuples; i++)
+			{
+				printfPQExpBuffer(&buf, "    %s", PQgetvalue(result, i, 0));
 				printTableAddFooter(&cont, buf.data);
 			}
 
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index e98f1a9..900ff80 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -350,7 +350,8 @@ NOTICE:  merging constraint "con1" with inherited definition
  d      | integer |           |          | 
 Check constraints:
     "con1" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test2 RENAME CONSTRAINT con1 TO con1foo; -- fail
 ERROR:  cannot rename inherited constraint "con1"
@@ -378,7 +379,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0) NO INHERIT;
 ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con2 TO con2foo; -- ok
@@ -405,7 +407,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 PRIMARY KEY (a);
 ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok
@@ -433,7 +436,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  d      | integer |           |          | 
 Check constraints:
     "con1foo" CHECK (a > 0)
-Inherits: constraint_rename_test
+Inherits:
+    constraint_rename_test
 
 DROP TABLE constraint_rename_test2;
 DROP TABLE constraint_rename_test;
@@ -650,7 +654,8 @@ alter table nv_parent add check (d between '2001-01-01'::date and '2099-12-31'::
 Check constraints:
     "nv_child_2009_d_check" CHECK (d >= '01-01-2009'::date AND d <= '12-31-2009'::date)
     "nv_parent_d_check" CHECK (d >= '01-01-2001'::date AND d <= '12-31-2099'::date) NOT VALID
-Inherits: nv_parent
+Inherits:
+    nv_parent
 
 -- we leave nv_parent and children around to help test pg_dump logic
 -- Foreign key adding test with mixed types
@@ -2408,7 +2413,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  b      | double precision |           |          | 
 Check constraints:
     "test_inh_check_a_check" CHECK (a > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2439,7 +2445,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  b      | double precision |           |          | 
 Check constraints:
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2479,7 +2486,8 @@ Check constraints:
     "blocal" CHECK (b < 1000::double precision)
     "bmerged" CHECK (b > 1::double precision)
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -2519,7 +2527,8 @@ Check constraints:
     "blocal" CHECK (b::double precision < 1000::double precision)
     "bmerged" CHECK (b::double precision > 1::double precision)
     "test_inh_check_a_check" CHECK (a::double precision > 10.2::double precision)
-Inherits: test_inh_check
+Inherits:
+    test_inh_check
 
 select relname, conname, coninhcount, conislocal, connoinherit
   from pg_constraint c, pg_class r
@@ -3308,7 +3317,8 @@ Typed table of type: test_type2
 --------+---------+-----------+----------+---------
  aa     | integer |           |          | 
  c      | text    |           |          | 
-Inherits: test_tbl2
+Inherits:
+    test_tbl2
 
 DROP TABLE test_tbl2_subclass, test_tbl2;
 DROP TYPE test_type2;
diff --git a/src/test/regress/expected/constraints.out b/src/test/regress/expected/constraints.out
index 5ca4fba..bb66bc7 100644
--- a/src/test/regress/expected/constraints.out
+++ b/src/test/regress/expected/constraints.out
@@ -996,7 +996,8 @@ CREATE TABLE ATACC2 () INHERITS (ATACC1);
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2;
 CREATE TABLE ATACC1 (a int);
@@ -1007,7 +1008,8 @@ CREATE TABLE ATACC2 () INHERITS (ATACC1);
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2;
 CREATE TABLE ATACC1 (a int);
@@ -1018,7 +1020,8 @@ ALTER TABLE ATACC1 ADD NOT NULL a NO INHERIT;
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: atacc1
+Inherits:
+    atacc1
 
 CREATE TABLE ATACC3 (PRIMARY KEY (a)) INHERITS (ATACC1);
 \d+ ATACC3
@@ -1030,7 +1033,8 @@ Indexes:
     "atacc3_pkey" PRIMARY KEY, btree (a)
 Not-null constraints:
     "atacc3_a_not_null" NOT NULL "a"
-Inherits: atacc1
+Inherits:
+    atacc1
 
 DROP TABLE ATACC1, ATACC2, ATACC3;
 -- NOT NULL NO INHERIT is not possible on partitioned tables
@@ -1058,7 +1062,8 @@ ALTER TABLE ATACC1 ADD CONSTRAINT ditto NOT NULL a;
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "ditto" NOT NULL "a" (inherited)
-Inherits: atacc2
+Inherits:
+    atacc2
 
 DROP TABLE ATACC1, ATACC2, ATACC3;
 -- Can't have two constraints with the same name
@@ -1117,7 +1122,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
 \d+ cnn_pk*
@@ -1138,7 +1144,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- As above, but create the primary key ahead of time
@@ -1164,7 +1171,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
 \d+ cnn_pk*
@@ -1185,7 +1193,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- As above, but create the primary key using a UNIQUE index
@@ -1214,7 +1223,8 @@ Child tables:
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b" (inherited)
-Inherits: cnn_pk
+Inherits:
+    cnn_pk
 
 DROP TABLE cnn_pk, cnn_pk_child;
 -- Unique constraints don't give raise to not-null constraints, however.
@@ -1313,7 +1323,8 @@ Not-null constraints:
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "notnull_tbl4_a_not_null" NOT NULL "a" (inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 \d+ notnull_tbl4_cld2
                              Table "public.notnull_tbl4_cld2"
@@ -1324,7 +1335,8 @@ Indexes:
     "notnull_tbl4_cld2_pkey" PRIMARY KEY, btree (a) DEFERRABLE
 Not-null constraints:
     "notnull_tbl4_cld2_a_not_null" NOT NULL "a" (local, inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 \d+ notnull_tbl4_cld3
                              Table "public.notnull_tbl4_cld3"
@@ -1335,7 +1347,8 @@ Indexes:
     "notnull_tbl4_cld3_pkey" PRIMARY KEY, btree (a) DEFERRABLE
 Not-null constraints:
     "a_nn" NOT NULL "a" (local, inherited)
-Inherits: notnull_tbl4
+Inherits:
+    notnull_tbl4
 
 -- leave these tables around for pg_upgrade testing
 -- It's possible to remove a constraint from parents without affecting children
@@ -1353,7 +1366,8 @@ ALTER TABLE ONLY notnull_tbl5 ALTER b DROP NOT NULL;
 Not-null constraints:
     "ann" NOT NULL "a"
     "bnn" NOT NULL "b"
-Inherits: notnull_tbl5
+Inherits:
+    notnull_tbl5
 
 CREATE TABLE notnull_tbl6 (a int CONSTRAINT ann NOT NULL,
 	b int CONSTRAINT bnn NOT NULL, check (a > 0)) PARTITION BY LIST (a);
diff --git a/src/test/regress/expected/create_table_like.out b/src/test/regress/expected/create_table_like.out
index d3c35c1..5720d16 100644
--- a/src/test/regress/expected/create_table_like.out
+++ b/src/test/regress/expected/create_table_like.out
@@ -261,8 +261,9 @@ CREATE TABLE test_like_5c (LIKE test_like_4 INCLUDING ALL)
 Check constraints:
     "test_like_4_a_check" CHECK (a > 0)
     "test_like_5x_p_check" CHECK (p > 0)
-Inherits: test_like_5,
-          test_like_5x
+Inherits:
+    test_like_5
+    test_like_5x
 
 -- Test updating of column numbers in statistics expressions (bug #18468)
 CREATE TABLE test_like_6 (a int, c text, b text);
@@ -394,7 +395,8 @@ Check constraints:
     "ctlt1_b_check" CHECK (length(b) > 100) NOT ENFORCED
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (local, inherited)
-Inherits: ctlt1
+Inherits:
+    ctlt1
 
 SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt1_inh'::regclass;
  description 
@@ -419,8 +421,9 @@ Check constraints:
     "ctlt3_c_check" CHECK (length(c) < 7)
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (inherited)
-Inherits: ctlt1,
-          ctlt3
+Inherits:
+    ctlt1
+    ctlt3
 
 CREATE TABLE ctlt13_like (LIKE ctlt3 INCLUDING CONSTRAINTS INCLUDING INDEXES INCLUDING COMMENTS INCLUDING STORAGE) INHERITS (ctlt1);
 NOTICE:  merging column "a" with inherited definition
@@ -441,7 +444,8 @@ Check constraints:
     "ctlt3_c_check" CHECK (length(c) < 7)
 Not-null constraints:
     "ctlt1_a_not_null" NOT NULL "a" (inherited)
-Inherits: ctlt1
+Inherits:
+    ctlt1
 
 SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt13_like'::regclass;
  description 
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index 06f3028..1c25a2f 100644
--- a/src/test/regress/expected/foreign_data.out
+++ b/src/test/regress/expected/foreign_data.out
@@ -1430,7 +1430,8 @@ Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 DROP FOREIGN TABLE ft2;
 \d+ fd_pt1
@@ -1484,7 +1485,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 CREATE TABLE ct3() INHERITS(ft2);
 CREATE FOREIGN TABLE ft3 (
@@ -1507,7 +1509,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1521,7 +1524,8 @@ Child tables:
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (inherited)
-Inherits: ft2
+Inherits:
+    ft2
 
 \d+ ft3
                                        Foreign table "public.ft3"
@@ -1533,7 +1537,8 @@ Inherits: ft2
 Not-null constraints:
     "ft3_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
-Inherits: ft2
+Inherits:
+    ft2
 
 -- add attributes recursively
 ALTER TABLE fd_pt1 ADD COLUMN c4 integer;
@@ -1576,7 +1581,8 @@ Not-null constraints:
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1596,7 +1602,8 @@ Child tables:
 Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (inherited)
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
-Inherits: ft2
+Inherits:
+    ft2
 
 \d+ ft3
                                        Foreign table "public.ft3"
@@ -1614,7 +1621,8 @@ Not-null constraints:
     "ft3_c1_not_null" NOT NULL "c1" (local, inherited)
     "fd_pt1_c7_not_null" NOT NULL "c7" (inherited)
 Server: s0
-Inherits: ft2
+Inherits:
+    ft2
 
 -- alter attributes recursively
 ALTER TABLE fd_pt1 ALTER COLUMN c4 SET DEFAULT 0;
@@ -1664,7 +1672,8 @@ Not-null constraints:
     "fd_pt1_c6_not_null" NOT NULL "c6" (inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1698,7 +1707,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1747,7 +1757,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 Child tables:
     ct3
     ft3, FOREIGN
@@ -1800,7 +1811,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- drop constraints recursively
 ALTER TABLE fd_pt1 DROP CONSTRAINT fd_pt1chk1 CASCADE;
@@ -1836,7 +1848,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- VALIDATE CONSTRAINT need do nothing on foreign tables
 ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
@@ -1868,7 +1881,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "c1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 -- changes name of an attribute recursively
 ALTER TABLE fd_pt1 RENAME COLUMN c1 TO f1;
@@ -1904,7 +1918,8 @@ Not-null constraints:
     "ft2_c1_not_null" NOT NULL "f1" (local, inherited)
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
-Inherits: fd_pt1
+Inherits:
+    fd_pt1
 
 DROP TABLE fd_pt1 CASCADE;
 NOTICE:  drop cascades to foreign table ft2
diff --git a/src/test/regress/expected/generated_stored.out b/src/test/regress/expected/generated_stored.out
index 8b7a71d..3461b6c 100644
--- a/src/test/regress/expected/generated_stored.out
+++ b/src/test/regress/expected/generated_stored.out
@@ -324,7 +324,8 @@ SELECT * FROM gtest1_1;
 --------+---------+-----------+----------+------------------------------------
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (a * 2) stored
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtest1_1 VALUES (4);
 SELECT * FROM gtest1_1;
@@ -373,7 +374,8 @@ NOTICE:  merging column "b" with inherited definition
  x      | integer |           |          |                                     | plain   |              | 
 Not-null constraints:
     "gtest1_a_not_null" NOT NULL "a" (inherited)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtestx (a, x) VALUES (11, 22);
 SELECT * FROM gtest1;
@@ -424,8 +426,9 @@ DETAIL:  User-specified column moved to the position of the inherited column.
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (x + 1) stored
  x      | integer |           |          | 
-Inherits: gtest1,
-          gtesty
+Inherits:
+    gtest1
+    gtesty
 
 -- test correct handling of GENERATED column that's only in child
 CREATE TABLE gtestp (f1 int);
@@ -1300,7 +1303,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+---------
  a      | integer |           |          | 
  b      | integer |           |          | 
-Inherits: gtest30
+Inherits:
+    gtest30
 
 DROP TABLE gtest30 CASCADE;
 NOTICE:  drop cascades to table gtest30_1
@@ -1325,7 +1329,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+------------------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2) stored
-Inherits: gtest30
+Inherits:
+    gtest30
 
 ALTER TABLE gtest30_1 ALTER COLUMN b DROP EXPRESSION;  -- error
 ERROR:  cannot drop generation expression from inherited column
diff --git a/src/test/regress/expected/generated_virtual.out b/src/test/regress/expected/generated_virtual.out
index 249e68b..e0af8de 100644
--- a/src/test/regress/expected/generated_virtual.out
+++ b/src/test/regress/expected/generated_virtual.out
@@ -318,7 +318,8 @@ SELECT * FROM gtest1_1;
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtest1_1 VALUES (4);
 SELECT * FROM gtest1_1;
@@ -367,7 +368,8 @@ NOTICE:  merging column "b" with inherited definition
  x      | integer |           |          |                              | plain   |              | 
 Not-null constraints:
     "gtest1_a_not_null" NOT NULL "a" (inherited)
-Inherits: gtest1
+Inherits:
+    gtest1
 
 INSERT INTO gtestx (a, x) VALUES (11, 22);
 SELECT * FROM gtest1;
@@ -418,8 +420,9 @@ DETAIL:  User-specified column moved to the position of the inherited column.
  a      | integer |           | not null | 
  b      | integer |           |          | generated always as (x + 1)
  x      | integer |           |          | 
-Inherits: gtest1,
-          gtesty
+Inherits:
+    gtest1
+    gtesty
 
 -- test correct handling of GENERATED column that's only in child
 CREATE TABLE gtestp (f1 int);
@@ -1270,7 +1273,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest30
+Inherits:
+    gtest30
 
 DROP TABLE gtest30 CASCADE;
 NOTICE:  drop cascades to table gtest30_1
@@ -1295,7 +1299,8 @@ Number of child tables: 1 (Use \d+ to list them.)
 --------+---------+-----------+----------+-----------------------------
  a      | integer |           |          | 
  b      | integer |           |          | generated always as (a * 2)
-Inherits: gtest30
+Inherits:
+    gtest30
 
 ALTER TABLE gtest30_1 ALTER COLUMN b DROP EXPRESSION;  -- error
 ERROR:  cannot drop generation expression from inherited column
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 500c857..59c9a3f 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -795,7 +795,8 @@ Number of child tables: 1 (Use \d+ to list them.)
  ff1    | integer |           |          | 
 Check constraints:
     "p2chk" CHECK (ff1 > 10)
-Inherits: p1
+Inherits:
+    p1
 
 -- Test that child does not override inheritable constraints of the parent
 create table c2 (constraint p2chk check (ff1 > 10) no inherit) inherits (p1);	--fails
@@ -990,8 +991,9 @@ create table c2(f3 int) inherits(p1,p2);
  f3     | integer |           |          | 
 Check constraints:
     "p2_f2_check" CHECK (f2 > 0)
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
 create table c3 (f4 int) inherits(c1,c2);
 NOTICE:  merging multiple inherited definitions of column "f1"
@@ -1007,8 +1009,9 @@ NOTICE:  merging multiple inherited definitions of column "f3"
  f4     | integer |           |          | 
 Check constraints:
     "p2_f2_check" CHECK (f2 > 0)
-Inherits: c1,
-          c2
+Inherits:
+    c1
+    c2
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -1029,7 +1032,8 @@ alter table pp1 add column a1 int check (a1 > 0);
  a1     | integer |           |          | 
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
-Inherits: pp1
+Inherits:
+    pp1
 
 create table cc2(f4 float) inherits(pp1,cc1);
 NOTICE:  merging multiple inherited definitions of column "f1"
@@ -1045,8 +1049,9 @@ NOTICE:  merging multiple inherited definitions of column "a1"
  f4     | double precision |           |          | 
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 alter table pp1 add column a2 int check (a2 > 0);
 NOTICE:  merging definition of column "a2" for child "cc2"
@@ -1064,8 +1069,9 @@ NOTICE:  merging constraint "pp1_a2_check" with inherited definition
 Check constraints:
     "pp1_a1_check" CHECK (a1 > 0)
     "pp1_a2_check" CHECK (a2 > 0)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 drop table pp1 cascade;
 NOTICE:  drop cascades to 2 other objects
@@ -1090,8 +1096,9 @@ ALTER TABLE inhts RENAME d TO dd;
  b      | integer |           |          |         | plain   |              | 
  c      | integer |           |          |         | plain   |              | 
  dd     | integer |           |          |         | plain   |              | 
-Inherits: inht1,
-          inhs1
+Inherits:
+    inht1
+    inhs1
 
 DROP TABLE inhts;
 -- Test for adding a column to a parent table with complex inheritance
@@ -1120,9 +1127,10 @@ Child tables:
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  i      | integer |           |          |         | plain   |              | 
  j      | bigint  |           |          | 1       | plain   |              | 
-Inherits: inhta,
-          inhtb,
-          inhtc
+Inherits:
+    inhta
+    inhtb
+    inhtc
 
 DROP TABLE inhta, inhtb, inhtc, inhtd;
 -- Test for renaming in diamond inheritance
@@ -1141,8 +1149,9 @@ ALTER TABLE inht1 RENAME aa TO aaa;
  x      | integer |           |          |         | plain   |              | 
  y      | integer |           |          |         | plain   |              | 
  z      | integer |           |          |         | plain   |              | 
-Inherits: inht2,
-          inht3
+Inherits:
+    inht2
+    inht3
 
 CREATE TABLE inhts (d int) INHERITS (inht2, inhs1);
 NOTICE:  merging multiple inherited definitions of column "b"
@@ -1158,8 +1167,9 @@ ERROR:  cannot rename inherited column "b"
  x      | integer |           |          |         | plain   |              | 
  c      | integer |           |          |         | plain   |              | 
  d      | integer |           |          |         | plain   |              | 
-Inherits: inht2,
-          inhs1
+Inherits:
+    inht2
+    inhs1
 
 WITH RECURSIVE r AS (
   SELECT 'inht1'::regclass AS inhrelid
@@ -1226,7 +1236,8 @@ Child tables:
  id     | integer           |           |          |         | plain    |              | 
  val1   | character varying |           |          |         | extended |              | 
  val2   | integer           |           |          |         | plain    |              | 
-Inherits: test_constraints
+Inherits:
+    test_constraints
 
 DROP TABLE test_constraints_inh;
 DROP TABLE test_constraints;
@@ -1259,7 +1270,8 @@ Child tables:
  Column |  Type  | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+--------+-----------+----------+---------+---------+--------------+-------------
  c      | circle |           |          |         | plain   |              | 
-Inherits: test_ex_constraints
+Inherits:
+    test_ex_constraints
 
 DROP TABLE test_ex_constraints_inh;
 DROP TABLE test_ex_constraints;
@@ -1303,7 +1315,8 @@ Child tables:
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  id1    | integer |           |          |         | plain   |              | 
-Inherits: test_foreign_constraints
+Inherits:
+    test_foreign_constraints
 
 DROP TABLE test_foreign_constraints_inh;
 DROP TABLE test_foreign_constraints;
@@ -1465,7 +1478,8 @@ alter table p1 drop constraint f1_pos;
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1
+Inherits:
+    p1
 
 drop table p1 cascade;
 NOTICE:  drop cascades to table p1_c1
@@ -1485,8 +1499,9 @@ alter table p1 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
               Table "public.p1p2_c2"
  Column |  Type   | Collation | Nullable | Default 
@@ -1494,8 +1509,9 @@ Inherits: p1,
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1,
-          p2
+Inherits:
+    p1
+    p2
 
 drop table p1, p2 cascade;
 NOTICE:  drop cascades to 2 other objects
@@ -1513,8 +1529,9 @@ NOTICE:  merging multiple inherited definitions of column "f1"
  f1     | integer |           |          | 
 Check constraints:
     "f1_pos" CHECK (f1 > 0)
-Inherits: p1_c1,
-          p1_c2
+Inherits:
+    p1_c1
+    p1_c2
 
 alter table p1 drop constraint f1_pos;
 \d p1_c1c2
@@ -1522,8 +1539,9 @@ alter table p1 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1_c1,
-          p1_c2
+Inherits:
+    p1_c1
+    p1_c2
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -1548,9 +1566,10 @@ alter table p1_c2 drop constraint f1_pos;
  Column |  Type   | Collation | Nullable | Default 
 --------+---------+-----------+----------+---------
  f1     | integer |           |          | 
-Inherits: p1_c1,
-          p1_c2,
-          p1
+Inherits:
+    p1_c1
+    p1_c2
+    p1
 
 drop table p1 cascade;
 NOTICE:  drop cascades to 3 other objects
@@ -2202,9 +2221,10 @@ alter table pp1 alter f1 set not null;
  f4     | double precision |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1,
-          cc1,
-          cc2
+Inherits:
+    pp1
+    cc1
+    cc2
 
 alter table cc3 no inherit pp1;
 alter table cc3 no inherit cc1;
@@ -2234,7 +2254,8 @@ alter table cc1 add column a2 int constraint nn not null;
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2250,8 +2271,9 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 alter table pp1 alter column f1 set not null;
 \d+ pp1
@@ -2276,7 +2298,8 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2292,8 +2315,9 @@ Child tables:
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 -- cannot create table with inconsistent NO INHERIT constraint
 create table cc3 (a2 int not null no inherit) inherits (cc1);
@@ -2320,7 +2344,8 @@ alter table cc1 alter column a2 drop not null;
  a2     | integer |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1
+Inherits:
+    pp1
 Child tables:
     cc2
 
@@ -2338,8 +2363,9 @@ ERROR:  cannot drop inherited constraint "pp1_f1_not_null" of relation "cc2"
  a2     | integer          |           |          |         | plain    |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
-Inherits: pp1,
-          cc1
+Inherits:
+    pp1
+    cc1
 
 -- remove from cc1, should fail again
 alter table cc1 alter column f1 drop not null;
@@ -2405,8 +2431,9 @@ alter table inh_pp1 alter column f1 drop not null;
  f2     | text             |           |          |         | extended |              | 
  f3     | integer          |           |          |         | plain    |              | 
  f4     | double precision |           |          |         | plain    |              | 
-Inherits: inh_pp1,
-          inh_cc1
+Inherits:
+    inh_pp1
+    inh_cc1
 
 drop table inh_pp1, inh_cc1, inh_cc2;
 -- Test a not-null addition that must walk down the hierarchy
@@ -2430,8 +2457,9 @@ create table inh_child1 () inherits (inh_parent1, inh_parent2);
 Not-null constraints:
     "nn" NOT NULL "a" (inherited)
     "inh_child1_b_not_null" NOT NULL "b" (inherited)
-Inherits: inh_parent1,
-          inh_parent2
+Inherits:
+    inh_parent1
+    inh_parent2
 
 create table inh_child2 (constraint foo not null a) inherits (inh_parent1, inh_parent2);
 alter table inh_child2 no inherit inh_parent2;
@@ -2444,7 +2472,8 @@ alter table inh_child2 no inherit inh_parent2;
 Not-null constraints:
     "foo" NOT NULL "a" (local, inherited)
     "nn" NOT NULL "b"
-Inherits: inh_parent1
+Inherits:
+    inh_parent1
 
 drop table inh_parent1, inh_parent2, inh_child1, inh_child2;
 -- Test multiple parents with overlapping primary keys
@@ -2483,8 +2512,9 @@ Not-null constraints:
     "inh_parent1_a_not_null" NOT NULL "a" (inherited)
     "inh_parent1_b_not_null" NOT NULL "b" (inherited)
     "inh_parent2_d_not_null" NOT NULL "d" (inherited)
-Inherits: inh_parent1,
-          inh_parent2
+Inherits:
+    inh_parent1
+    inh_parent2
 
 drop table inh_parent1, inh_parent2, inh_child;
 -- NOT NULL NO INHERIT
@@ -2508,13 +2538,15 @@ select conrelid::regclass, conname, contype, conkey,
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: inh_nn_parent
+Inherits:
+    inh_nn_parent
 
                                Table "public.inh_nn_child2"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
-Inherits: inh_nn_parent
+Inherits:
+    inh_nn_parent
 
                                Table "public.inh_nn_parent"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -2593,7 +2625,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_parent
+Inherits:
+    inh_parent
 Child tables:
     inh_child2
 
@@ -2604,7 +2637,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child2_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_child1
+Inherits:
+    inh_child1
 
 select conrelid::regclass, conname, contype, coninhcount, conislocal
  from pg_constraint where contype = 'n' and
@@ -2649,7 +2683,8 @@ Child tables:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child2_f1_not_null" NOT NULL "f1" (local, inherited)
-Inherits: inh_child1
+Inherits:
+    inh_child1
 
 select conrelid::regclass, conname, contype, coninhcount, conislocal
  from pg_constraint where contype = 'n' and
diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out
index 1eb8fba..296f414 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -3558,7 +3558,8 @@ alter trigger parenttrig on parent rename to anothertrig;
  a      | integer |           |          |         | plain   |              | 
 Triggers:
     parenttrig AFTER INSERT ON child FOR EACH ROW EXECUTE FUNCTION f()
-Inherits: parent
+Inherits:
+    parent
 
 drop table parent, child;
 drop function f();
diff --git a/src/test/regress/expected/without_overlaps.out b/src/test/regress/expected/without_overlaps.out
index 06f6fd2..36d2c18 100644
--- a/src/test/regress/expected/without_overlaps.out
+++ b/src/test/regress/expected/without_overlaps.out
@@ -80,7 +80,8 @@ CREATE TABLE temporal_rng2 () INHERITS (temporal_rng);
 ----------+-----------+-----------+----------+---------
  id       | int4range |           | not null | 
  valid_at | daterange |           | not null | 
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng2;
 DROP TABLE temporal_rng;
@@ -100,7 +101,8 @@ CREATE TABLE temporal_rng2 (
  valid_at | daterange |           | not null | 
 Indexes:
     "temporal_rng_pk" PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng CASCADE;
 NOTICE:  drop cascades to table temporal_rng2
@@ -120,7 +122,8 @@ ALTER TABLE temporal_rng2
  valid_at | daterange |           | not null | 
 Indexes:
     "temporal_rng_pk" PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
-Inherits: temporal_rng
+Inherits:
+    temporal_rng
 
 DROP TABLE temporal_rng2;
 DROP TABLE temporal_rng;
-- 
1.8.3.1



  [application/octet-stream] v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch (29.6K, 3-v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch)
  download | inline diff:
From ed64c8c2ede119751411f6e60092ab79239b9a12 Mon Sep 17 00:00:00 2001
From: Peter Smith <[email protected]>
Date: Wed, 21 Jan 2026 13:52:02 +1100
Subject: [PATCH v2] Fix to make psql \d+ lists of partitions look same as
 other lists

---
 contrib/seg/expected/partition.out             |  5 +-
 src/bin/psql/describe.c                        | 16 +++----
 src/test/regress/expected/alter_table.out      |  6 ++-
 src/test/regress/expected/constraints.out      | 22 +++++----
 src/test/regress/expected/create_table.out     | 17 ++++---
 src/test/regress/expected/foreign_data.out     | 64 +++++++++++++++++---------
 src/test/regress/expected/inherit.out          | 58 ++++++++++++++---------
 src/test/regress/expected/insert.out           | 32 +++++++------
 src/test/regress/expected/partition_split.out  | 23 +++++----
 src/test/regress/expected/replica_identity.out |  6 ++-
 src/test/regress/expected/rowsecurity.out      |  7 +--
 src/test/regress/expected/tablespace.out       | 10 ++--
 12 files changed, 160 insertions(+), 106 deletions(-)

diff --git a/contrib/seg/expected/partition.out b/contrib/seg/expected/partition.out
index 90d8397..8b86a40 100644
--- a/contrib/seg/expected/partition.out
+++ b/contrib/seg/expected/partition.out
@@ -35,8 +35,9 @@ Indexes:
     "pti1" btree ((mydouble(category) + 1))
     "pti2" btree (sdata)
     "pti3" btree (tdata COLLATE mycollation)
-Partitions: pt12 FOR VALUES IN (1, 2),
-            pt34 FOR VALUES IN (3, 4)
+Partitions:
+    pt12 FOR VALUES IN (1, 2)
+    pt34 FOR VALUES IN (3, 4)
 
 \d+ pt12
                                      Table "public.pt12"
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 3584c4e..d3d9b84 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3565,18 +3565,18 @@ describeOneTableDetails(const char *schemaname,
 		{
 			/* display the list of child tables */
 			const char *ct = is_partitioned ? _("Partitions") : _("Child tables");
-			int			ctw = pg_wcswidth(ct, strlen(ct), pset.encoding);
+
+			if (tuples > 0)
+			{
+				printfPQExpBuffer(&buf, "%s:", ct);
+				printTableAddFooter(&cont, buf.data);
+			}
 
 			for (i = 0; i < tuples; i++)
 			{
 				char		child_relkind = *PQgetvalue(result, i, 1);
 
-				if (i == 0)
-					printfPQExpBuffer(&buf, "%s: %s",
-									  ct, PQgetvalue(result, i, 0));
-				else
-					printfPQExpBuffer(&buf, "%*s  %s",
-									  ctw, "", PQgetvalue(result, i, 0));
+				printfPQExpBuffer(&buf, "    %s", PQgetvalue(result, i, 0));
 				if (!PQgetisnull(result, i, 3))
 					appendPQExpBuffer(&buf, " %s", PQgetvalue(result, i, 3));
 				if (child_relkind == RELKIND_PARTITIONED_TABLE ||
@@ -3586,8 +3586,6 @@ describeOneTableDetails(const char *schemaname,
 					appendPQExpBufferStr(&buf, ", FOREIGN");
 				if (strcmp(PQgetvalue(result, i, 2), "t") == 0)
 					appendPQExpBufferStr(&buf, " (DETACH PENDING)");
-				if (i < tuples - 1)
-					appendPQExpBufferChar(&buf, ',');
 
 				printTableAddFooter(&cont, buf.data);
 			}
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index ac1a734..e98f1a9 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -1236,7 +1236,8 @@ primary key, btree, for table "public.atnnpart1"
 Partition key: LIST (id)
 Not-null constraints:
     "dummy_constr" NOT NULL "id" NOT VALID
-Partitions: atnnpart1 FOR VALUES IN (1)
+Partitions:
+    atnnpart1 FOR VALUES IN (1)
 
 BEGIN;
 ALTER TABLE atnnparted VALIDATE CONSTRAINT dummy_constr;
@@ -1267,7 +1268,8 @@ primary key, btree, for table "public.atnnpart1"
 Partition key: LIST (id)
 Not-null constraints:
     "dummy_constr" NOT NULL "id"
-Partitions: atnnpart1 FOR VALUES IN (1)
+Partitions:
+    atnnpart1 FOR VALUES IN (1)
 
 ROLLBACK;
 -- leave a table in this state for the pg_upgrade test
diff --git a/src/test/regress/expected/constraints.out b/src/test/regress/expected/constraints.out
index 1bbf59c..5ca4fba 100644
--- a/src/test/regress/expected/constraints.out
+++ b/src/test/regress/expected/constraints.out
@@ -1107,7 +1107,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1127,7 +1128,8 @@ ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1152,7 +1154,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1172,7 +1175,8 @@ ALTER TABLE cnn_pk DROP CONSTRAINT cnn_primarykey;
  b      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1200,7 +1204,8 @@ Indexes:
     "cnn_primarykey" PRIMARY KEY, btree (b)
 Not-null constraints:
     "cnn_pk_b_not_null" NOT NULL "b"
-Child tables: cnn_pk_child
+Child tables:
+    cnn_pk_child
 
                                Table "public.cnn_pk_child"
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
@@ -1268,9 +1273,10 @@ Indexes:
     "notnull_tbl4_pkey" PRIMARY KEY, btree (a) DEFERRABLE INITIALLY DEFERRED
 Not-null constraints:
     "notnull_tbl4_a_not_null" NOT NULL "a"
-Child tables: notnull_tbl4_cld,
-              notnull_tbl4_cld2,
-              notnull_tbl4_cld3
+Child tables:
+    notnull_tbl4_cld
+    notnull_tbl4_cld2
+    notnull_tbl4_cld3
 
 \d+ notnull_tbl4_lk
                               Table "public.notnull_tbl4_lk"
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index 029beb2..f5b4e93 100644
--- a/src/test/regress/expected/create_table.out
+++ b/src/test/regress/expected/create_table.out
@@ -425,10 +425,11 @@ CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | integer |           |          |         | plain   |              | 
 Partition key: LIST (a)
-Partitions: part_null FOR VALUES IN (NULL),
-            part_p1 FOR VALUES IN (1),
-            part_p2 FOR VALUES IN (2),
-            part_p3 FOR VALUES IN (3)
+Partitions:
+    part_null FOR VALUES IN (NULL)
+    part_p1 FOR VALUES IN (1)
+    part_p2 FOR VALUES IN (2)
+    part_p3 FOR VALUES IN (3)
 
 -- forbidden expressions for partition bound with list partitioned table
 CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename);
@@ -893,7 +894,8 @@ Partition constraint: ((a IS NOT NULL) AND (a = 'c'::text))
 Partition key: RANGE (b)
 Not-null constraints:
     "part_c_b_not_null" NOT NULL "b" (local, inherited)
-Partitions: part_c_1_10 FOR VALUES FROM (1) TO (10)
+Partitions:
+    part_c_1_10 FOR VALUES FROM (1) TO (10)
 
 -- a level-2 partition's constraint will include the parent's expressions
 \d+ part_c_1_10
@@ -1038,8 +1040,9 @@ create table boolspart_f partition of boolspart for values in (false);
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  a      | boolean |           |          |         | plain   |              | 
 Partition key: LIST (a)
-Partitions: boolspart_f FOR VALUES IN (false),
-            boolspart_t FOR VALUES IN (true)
+Partitions:
+    boolspart_f FOR VALUES IN (false)
+    boolspart_t FOR VALUES IN (true)
 
 drop table boolspart;
 -- partitions mixing temporary and permanent relations
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index cce49e5..06f3028 100644
--- a/src/test/regress/expected/foreign_data.out
+++ b/src/test/regress/expected/foreign_data.out
@@ -1416,7 +1416,8 @@ CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1)
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1469,7 +1470,8 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1506,8 +1508,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 \d+ ct3
                                     Table "public.ct3"
@@ -1553,7 +1556,8 @@ ALTER TABLE fd_pt1 ADD COLUMN c8 integer;
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
     "fd_pt1_c7_not_null" NOT NULL "c7"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1573,8 +1577,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 \d+ ct3
                                     Table "public.ct3"
@@ -1639,7 +1644,8 @@ ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
     "fd_pt1_c6_not_null" NOT NULL "c6"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1659,8 +1665,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 -- drop attributes recursively
 ALTER TABLE fd_pt1 DROP COLUMN c4;
@@ -1677,7 +1684,8 @@ ALTER TABLE fd_pt1 DROP COLUMN c8;
  c3     | date    |           |          |         | plain    |              | 
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1691,8 +1699,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 -- add constraints recursively
 ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
@@ -1722,7 +1731,8 @@ Check constraints:
     "fd_pt1chk2" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1738,8 +1748,9 @@ Not-null constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ct3,
-              ft3, FOREIGN
+Child tables:
+    ct3
+    ft3, FOREIGN
 
 DROP FOREIGN TABLE ft2; -- ERROR
 ERROR:  cannot drop foreign table ft2 because other objects depend on it
@@ -1773,7 +1784,8 @@ Check constraints:
     "fd_pt1chk2" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1807,7 +1819,8 @@ Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1838,7 +1851,8 @@ Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "c1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1873,7 +1887,8 @@ Check constraints:
     "f2_check" CHECK (f2 <> ''::text)
 Not-null constraints:
     "fd_pt1_c1_not_null" NOT NULL "f1"
-Child tables: ft2, FOREIGN
+Child tables:
+    ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1935,7 +1950,8 @@ CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR VALUES IN (1)
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -2017,7 +2033,8 @@ ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1);
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -2049,7 +2066,8 @@ ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> '');
 Partition key: LIST (c1)
 Not-null constraints:
     "fd_pt2_c1_not_null" NOT NULL "c1"
-Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Partitions:
+    fd_pt2_1 FOR VALUES IN (1), FOREIGN
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 0490a74..500c857 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -1110,8 +1110,9 @@ NOTICE:  merging definition of column "j" for child "inhtd"
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  i      | integer |           |          |         | plain   |              | 
  j      | bigint  |           |          | 1       | plain   |              | 
-Child tables: inhtb,
-              inhtd
+Child tables:
+    inhtb
+    inhtd
 
 \d+ inhtd
                                    Table "public.inhtd"
@@ -1204,7 +1205,8 @@ CREATE TABLE test_constraints_inh () INHERITS (test_constraints);
  val2   | integer           |           |          |         | plain    |              | 
 Indexes:
     "test_constraints_val1_val2_key" UNIQUE CONSTRAINT, btree (val1, val2)
-Child tables: test_constraints_inh
+Child tables:
+    test_constraints_inh
 
 ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key;
 \d+ test_constraints
@@ -1214,7 +1216,8 @@ ALTER TABLE ONLY test_constraints DROP CONSTRAINT test_constraints_val1_val2_key
  id     | integer           |           |          |         | plain    |              | 
  val1   | character varying |           |          |         | extended |              | 
  val2   | integer           |           |          |         | plain    |              | 
-Child tables: test_constraints_inh
+Child tables:
+    test_constraints_inh
 
 \d+ test_constraints_inh
                                  Table "public.test_constraints_inh"
@@ -1239,7 +1242,8 @@ CREATE TABLE test_ex_constraints_inh () INHERITS (test_ex_constraints);
  c      | circle |           |          |         | plain   |              | 
 Indexes:
     "test_ex_constraints_c_excl" EXCLUDE USING gist (c WITH &&)
-Child tables: test_ex_constraints_inh
+Child tables:
+    test_ex_constraints_inh
 
 ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
 \d+ test_ex_constraints
@@ -1247,7 +1251,8 @@ ALTER TABLE test_ex_constraints DROP CONSTRAINT test_ex_constraints_c_excl;
  Column |  Type  | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+--------+-----------+----------+---------+---------+--------------+-------------
  c      | circle |           |          |         | plain   |              | 
-Child tables: test_ex_constraints_inh
+Child tables:
+    test_ex_constraints_inh
 
 \d+ test_ex_constraints_inh
                          Table "public.test_ex_constraints_inh"
@@ -1281,7 +1286,8 @@ Not-null constraints:
  id1    | integer |           |          |         | plain   |              | 
 Foreign-key constraints:
     "test_foreign_constraints_id1_fkey" FOREIGN KEY (id1) REFERENCES test_primary_constraints(id)
-Child tables: test_foreign_constraints_inh
+Child tables:
+    test_foreign_constraints_inh
 
 ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id1_fkey;
 \d+ test_foreign_constraints
@@ -1289,7 +1295,8 @@ ALTER TABLE test_foreign_constraints DROP CONSTRAINT test_foreign_constraints_id
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  id1    | integer |           |          |         | plain   |              | 
-Child tables: test_foreign_constraints_inh
+Child tables:
+    test_foreign_constraints_inh
 
 \d+ test_foreign_constraints_inh
                        Table "public.test_foreign_constraints_inh"
@@ -2228,7 +2235,8 @@ Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 \d+ cc2
                                          Table "public.cc2"
@@ -2253,8 +2261,9 @@ alter table pp1 alter column f1 set not null;
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1"
-Child tables: cc1,
-              cc2
+Child tables:
+    cc1
+    cc2
 
 \d+ cc1
                                     Table "public.cc1"
@@ -2268,7 +2277,8 @@ Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
     "nn" NOT NULL "a2"
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 \d+ cc2
                                          Table "public.cc2"
@@ -2311,7 +2321,8 @@ alter table cc1 alter column a2 drop not null;
 Not-null constraints:
     "pp1_f1_not_null" NOT NULL "f1" (inherited)
 Inherits: pp1
-Child tables: cc2
+Child tables:
+    cc2
 
 -- same for cc2
 alter table cc2 alter column f1 drop not null;
@@ -2340,8 +2351,9 @@ alter table pp1 alter column f1 drop not null;
  Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description 
 --------+---------+-----------+----------+---------+---------+--------------+-------------
  f1     | integer |           |          |         | plain   |              | 
-Child tables: cc1,
-              cc2
+Child tables:
+    cc1
+    cc2
 
 alter table pp1 add primary key (f1);
 -- Leave these tables around, for pg_upgrade testing
@@ -2510,8 +2522,9 @@ Inherits: inh_nn_parent
  a      | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_nn_parent_a_not_null" NOT NULL "a" NO INHERIT
-Child tables: inh_nn_child,
-              inh_nn_child2
+Child tables:
+    inh_nn_child
+    inh_nn_child2
 
 drop table inh_nn_parent, inh_nn_child, inh_nn_child2;
 CREATE TABLE inh_nn_parent (a int, NOT NULL a NO INHERIT);
@@ -2570,7 +2583,8 @@ alter table inh_parent alter column f1 set not null;
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_parent_f1_not_null" NOT NULL "f1"
-Child tables: inh_child1
+Child tables:
+    inh_child1
 
 \d+ inh_child1
                                 Table "public.inh_child1"
@@ -2580,7 +2594,8 @@ Child tables: inh_child1
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1" (local, inherited)
 Inherits: inh_parent
-Child tables: inh_child2
+Child tables:
+    inh_child2
 
 \d+ inh_child2
                                 Table "public.inh_child2"
@@ -2623,8 +2638,9 @@ Not-null constraints:
  f1     | integer |           | not null |         | plain   |              | 
 Not-null constraints:
     "inh_child1_f1_not_null" NOT NULL "f1"
-Child tables: inh_child2,
-              inh_child3
+Child tables:
+    inh_child2
+    inh_child3
 
 \d+ inh_child2
                                 Table "public.inh_child2"
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index cf4b522..75b8de7 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -567,13 +567,14 @@ from hash_parted order by part;
  a      | text    |           |          |         | extended |              | 
  b      | integer |           |          |         | plain    |              | 
 Partition key: LIST (lower(a))
-Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
-            part_cc_dd FOR VALUES IN ('cc', 'dd'),
-            part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
-            part_gg FOR VALUES IN ('gg'), PARTITIONED,
-            part_null FOR VALUES IN (NULL),
-            part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED,
-            part_default DEFAULT, PARTITIONED
+Partitions:
+    part_aa_bb FOR VALUES IN ('aa', 'bb')
+    part_cc_dd FOR VALUES IN ('cc', 'dd')
+    part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED
+    part_gg FOR VALUES IN ('gg'), PARTITIONED
+    part_null FOR VALUES IN (NULL)
+    part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED
+    part_default DEFAULT, PARTITIONED
 
 -- cleanup
 drop table range_parted, list_parted;
@@ -972,14 +973,15 @@ create table mcrparted8_ge_d partition of mcrparted for values from ('d', minval
  a      | text    |           |          |         | extended |              | 
  b      | integer |           |          |         | plain    |              | 
 Partition key: RANGE (a, b)
-Partitions: mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVALUE),
-            mcrparted2_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE),
-            mcrparted3_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE),
-            mcrparted4_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0),
-            mcrparted5_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10),
-            mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE),
-            mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE),
-            mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
+Partitions:
+    mcrparted1_lt_b FOR VALUES FROM (MINVALUE, MINVALUE) TO ('b', MINVALUE)
+    mcrparted2_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE)
+    mcrparted3_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE)
+    mcrparted4_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0)
+    mcrparted5_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10)
+    mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE)
+    mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE)
+    mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, MAXVALUE)
 
 \d+ mcrparted1_lt_b
                               Table "public.mcrparted1_lt_b"
diff --git a/src/test/regress/expected/partition_split.out b/src/test/regress/expected/partition_split.out
index 4004efe..13ca733 100644
--- a/src/test/regress/expected/partition_split.out
+++ b/src/test/regress/expected/partition_split.out
@@ -138,10 +138,11 @@ SET search_path = partition_split_schema, public;
  salesperson_id | integer |           |          |         | plain   |              | 
  sales_date     | date    |           |          |         | plain   |              | 
 Partition key: RANGE (sales_date)
-Partitions: partition_split_schema2.sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022'),
-            partition_split_schema2.sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022'),
-            partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022'),
-            sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
+Partitions:
+    partition_split_schema2.sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022')
+    partition_split_schema2.sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022')
+    partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022')
+    sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
 
 DROP TABLE sales_range;
 DROP TABLE sales_others;
@@ -242,11 +243,12 @@ ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
  sales_amount     | integer               |           |          |         | plain    |              | 
  sales_date       | date                  |           |          |         | plain    |              | 
 Partition key: RANGE (sales_date)
-Partitions: partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022'),
-            sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022'),
-            sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022'),
-            sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022'),
-            sales_others DEFAULT
+Partitions:
+    partition_split_schema2.sales_mar2022 FOR VALUES FROM ('03-01-2022') TO ('04-01-2022')
+    sales_apr2022 FOR VALUES FROM ('04-01-2022') TO ('05-01-2022')
+    sales_feb2022 FOR VALUES FROM ('02-01-2022') TO ('03-01-2022')
+    sales_jan2022 FOR VALUES FROM ('01-01-2022') TO ('02-01-2022')
+    sales_others DEFAULT
 
 SELECT tableoid::regclass, * FROM sales_range ORDER BY tableoid::regclass::text COLLATE "C", salesperson_id;
                tableoid                | salesperson_id | salesperson_name | sales_amount | sales_date 
@@ -1317,7 +1319,8 @@ CREATE TABLE t_bigint_default PARTITION OF t_bigint DEFAULT;
  j      | integer |           |          | 101                                   | plain   |              | 
  k      | integer |           |          | generated always as ((b + 10)) stored | plain   |              | 
 Partition key: RANGE (b)
-Partitions: t_bigint_default DEFAULT
+Partitions:
+    t_bigint_default DEFAULT
 
 \d+ t_bigint_default
                                     Table "partition_split_schema.t_bigint_default"
diff --git a/src/test/regress/expected/replica_identity.out b/src/test/regress/expected/replica_identity.out
index b9b8dde..336b04f 100644
--- a/src/test/regress/expected/replica_identity.out
+++ b/src/test/regress/expected/replica_identity.out
@@ -262,7 +262,8 @@ Indexes:
     "test_replica_identity4_pkey" PRIMARY KEY, btree (id) INVALID REPLICA IDENTITY
 Not-null constraints:
     "test_replica_identity4_id_not_null" NOT NULL "id"
-Partitions: test_replica_identity4_1 FOR VALUES IN (1)
+Partitions:
+    test_replica_identity4_1 FOR VALUES IN (1)
 
 ALTER INDEX test_replica_identity4_pkey
   ATTACH PARTITION test_replica_identity4_1_pkey;
@@ -276,7 +277,8 @@ Indexes:
     "test_replica_identity4_pkey" PRIMARY KEY, btree (id) REPLICA IDENTITY
 Not-null constraints:
     "test_replica_identity4_id_not_null" NOT NULL "id"
-Partitions: test_replica_identity4_1 FOR VALUES IN (1)
+Partitions:
+    test_replica_identity4_1 FOR VALUES IN (1)
 
 -- Dropping the primary key is not allowed if that would leave the replica
 -- identity as nullable
diff --git a/src/test/regress/expected/rowsecurity.out b/src/test/regress/expected/rowsecurity.out
index c958ef4..3fdc45d 100644
--- a/src/test/regress/expected/rowsecurity.out
+++ b/src/test/regress/expected/rowsecurity.out
@@ -1216,9 +1216,10 @@ Policies:
       USING ((cid < 55))
 Not-null constraints:
     "part_document_dlevel_not_null" NOT NULL "dlevel"
-Partitions: part_document_fiction FOR VALUES FROM (11) TO (12),
-            part_document_nonfiction FOR VALUES FROM (99) TO (100),
-            part_document_satire FOR VALUES FROM (55) TO (56)
+Partitions:
+    part_document_fiction FOR VALUES FROM (11) TO (12)
+    part_document_nonfiction FOR VALUES FROM (99) TO (100)
+    part_document_satire FOR VALUES FROM (55) TO (56)
 
 SELECT * FROM pg_policies WHERE schemaname = 'regress_rls_schema' AND tablename like '%part_document%' ORDER BY policyname;
      schemaname     |   tablename   | policyname | permissive  |       roles        | cmd |                    qual                    | with_check 
diff --git a/src/test/regress/expected/tablespace.out b/src/test/regress/expected/tablespace.out
index a90e39e..97b6cb7 100644
--- a/src/test/regress/expected/tablespace.out
+++ b/src/test/regress/expected/tablespace.out
@@ -355,8 +355,9 @@ Number of partitions: 2 (Use \d+ to list them.)
 Partition key: LIST (a)
 Indexes:
     "part_a_idx" btree (a), tablespace "regress_tblspace"
-Partitions: testschema.part1 FOR VALUES IN (1),
-            testschema.part2 FOR VALUES IN (2)
+Partitions:
+    testschema.part1 FOR VALUES IN (1)
+    testschema.part2 FOR VALUES IN (2)
 
 \d testschema.part1
              Table "testschema.part1"
@@ -392,8 +393,9 @@ Tablespace: "regress_tblspace"
 --------+---------+------+------------+---------+--------------
  a      | integer | yes  | a          | plain   | 
 btree, for table "testschema.part"
-Partitions: testschema.part1_a_idx,
-            testschema.part2_a_idx
+Partitions:
+    testschema.part1_a_idx
+    testschema.part2_a_idx
 Tablespace: "regress_tblspace"
 
 -- partitioned rels cannot specify the default tablespace.  These fail:
-- 
1.8.3.1



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-21 08:04  Chao Li <[email protected]>
  parent: Peter Smith <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Chao Li @ 2026-01-21 08:04 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>



> On Jan 21, 2026, at 10:58, Peter Smith <[email protected]> wrote:
> 
> A rebase was needed for some more test expected output changes.
> 
> PSA v2.
> 
> ======
> Kind Regards,
> Peter Smith.
> Fujitsu Australia
> <v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>

I still see some difference:
```
evantest=# \d+ p_test;
                                     Partitioned table "public.p_test"
  Column  |  Type   | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
----------+---------+-----------+----------+---------+----------+-------------+--------------+-------------
 id       | integer |           |          |         | plain    |             |              |
 username | text    |           |          |         | extended |             |              |
 category | text    |           |          |         | extended |             |              |
Partition key: LIST (category)
Indexes:
    "idx_p_test_id" btree (id)
Partitions:
    p_test_v1 FOR VALUES IN ('A')
    p_test_v2 FOR VALUES IN ('B')
```

The index name is quoted, but the partition names are not.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/










^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-21 08:22  Peter Smith <[email protected]>
  parent: Chao Li <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Smith @ 2026-01-21 08:22 UTC (permalink / raw)
  To: Chao Li <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Wed, Jan 21, 2026 at 7:05 PM Chao Li <[email protected]> wrote:
>
>
>
> > On Jan 21, 2026, at 10:58, Peter Smith <[email protected]> wrote:
> >
> > A rebase was needed for some more test expected output changes.
> >
> > PSA v2.
> >
> > ======
> > Kind Regards,
> > Peter Smith.
> > Fujitsu Australia
> > <v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>
>
> I still see some difference:
> ```
> evantest=# \d+ p_test;
>                                      Partitioned table "public.p_test"
>   Column  |  Type   | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
> ----------+---------+-----------+----------+---------+----------+-------------+--------------+-------------
>  id       | integer |           |          |         | plain    |             |              |
>  username | text    |           |          |         | extended |             |              |
>  category | text    |           |          |         | extended |             |              |
> Partition key: LIST (category)
> Indexes:
>     "idx_p_test_id" btree (id)
> Partitions:
>     p_test_v1 FOR VALUES IN ('A')
>     p_test_v2 FOR VALUES IN ('B')
> ```
>
> The index name is quoted, but the partition names are not.
>

AFAICT
Indexes are quoted
Constraints are quoted
Publications are also quoted

Partitions are NOT quoted
Inherits are NOT quoted

~

Please confirm --- So, you are expecting that Partitions and Child
tables should also be quoted, so that everything looks the same?

This is scope creep from the original intent of this thread, so I will
look at doing this in a separate patch 0003.

======
Kind Regards
Peter Smith.
Fujitsu Australia






^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-21 08:30  Chao Li <[email protected]>
  parent: Peter Smith <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Chao Li @ 2026-01-21 08:30 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>



> On Jan 21, 2026, at 16:22, Peter Smith <[email protected]> wrote:
> 
> On Wed, Jan 21, 2026 at 7:05 PM Chao Li <[email protected]> wrote:
>> 
>> 
>> 
>>> On Jan 21, 2026, at 10:58, Peter Smith <[email protected]> wrote:
>>> 
>>> A rebase was needed for some more test expected output changes.
>>> 
>>> PSA v2.
>>> 
>>> ======
>>> Kind Regards,
>>> Peter Smith.
>>> Fujitsu Australia
>>> <v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>
>> 
>> I still see some difference:
>> ```
>> evantest=# \d+ p_test;
>>                                     Partitioned table "public.p_test"
>>  Column  |  Type   | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
>> ----------+---------+-----------+----------+---------+----------+-------------+--------------+-------------
>> id       | integer |           |          |         | plain    |             |              |
>> username | text    |           |          |         | extended |             |              |
>> category | text    |           |          |         | extended |             |              |
>> Partition key: LIST (category)
>> Indexes:
>>    "idx_p_test_id" btree (id)
>> Partitions:
>>    p_test_v1 FOR VALUES IN ('A')
>>    p_test_v2 FOR VALUES IN ('B')
>> ```
>> 
>> The index name is quoted, but the partition names are not.
>> 
> 
> AFAICT
> Indexes are quoted
> Constraints are quoted
> Publications are also quoted
> 
> Partitions are NOT quoted
> Inherits are NOT quoted
> 
> ~
> 
> Please confirm --- So, you are expecting that Partitions and Child
> tables should also be quoted, so that everything looks the same?
> 
> This is scope creep from the original intent of this thread, so I will
> look at doing this in a separate patch 0003.
> 
> ======
> Kind Regards
> Peter Smith.
> Fujitsu Australia

Actually I don’t know the rule, which should be quoted and which should not. Is the inconstancy a blocker?

So, I was just pointing out the inconsistency, and I want to hear a clarification from someone.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/










^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-01-21 21:08  Peter Smith <[email protected]>
  parent: Chao Li <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Smith @ 2026-01-21 21:08 UTC (permalink / raw)
  To: Chao Li <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Wed, Jan 21, 2026 at 7:30 PM Chao Li <[email protected]> wrote:
>
>
>
> > On Jan 21, 2026, at 16:22, Peter Smith <[email protected]> wrote:
> >
> > On Wed, Jan 21, 2026 at 7:05 PM Chao Li <[email protected]> wrote:
> >>
> >>
> >>
> >>> On Jan 21, 2026, at 10:58, Peter Smith <[email protected]> wrote:
> >>>
> >>> A rebase was needed for some more test expected output changes.
> >>>
> >>> PSA v2.
> >>>
> >>> ======
> >>> Kind Regards,
> >>> Peter Smith.
> >>> Fujitsu Australia
> >>> <v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>
> >>
> >> I still see some difference:
> >> ```
> >> evantest=# \d+ p_test;
> >>                                     Partitioned table "public.p_test"
> >>  Column  |  Type   | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
> >> ----------+---------+-----------+----------+---------+----------+-------------+--------------+-------------
> >> id       | integer |           |          |         | plain    |             |              |
> >> username | text    |           |          |         | extended |             |              |
> >> category | text    |           |          |         | extended |             |              |
> >> Partition key: LIST (category)
> >> Indexes:
> >>    "idx_p_test_id" btree (id)
> >> Partitions:
> >>    p_test_v1 FOR VALUES IN ('A')
> >>    p_test_v2 FOR VALUES IN ('B')
> >> ```
> >>
> >> The index name is quoted, but the partition names are not.
> >>
> >
> > AFAICT
> > Indexes are quoted
> > Constraints are quoted
> > Publications are also quoted
> >
> > Partitions are NOT quoted
> > Inherits are NOT quoted
> >
> > ~
> >
> > Please confirm --- So, you are expecting that Partitions and Child
> > tables should also be quoted, so that everything looks the same?
> >
> > This is scope creep from the original intent of this thread, so I will
> > look at doing this in a separate patch 0003.
> >
> > ======
> > Kind Regards
> > Peter Smith.
> > Fujitsu Australia
>
> Actually I don’t know the rule, which should be quoted and which should not. Is the inconstancy a blocker?
>
> So, I was just pointing out the inconsistency, and I want to hear a clarification from someone.
>

OK. I feel that the "Partitions" and "Child tables" + "Interits" might
be the odd ones out here, just as those were the odd ones out re the
list indentation logic.

But I will hold off on adding quotes for them until I hear some
committer advice that it would be a worthwhile change.

======
Kind Regards,
Peter Smith.
Fujitsu Australia






^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-02-04 05:00  Soumya S Murali <[email protected]>
  parent: Peter Smith <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Soumya S Murali @ 2026-02-04 05:00 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: Chao Li <[email protected]>; PostgreSQL Hackers <[email protected]>

Hi all,

Thank you for updating the patches.

On Tue, Feb 3, 2026 at 3:24 PM Peter Smith <[email protected]> wrote:
>
> On Wed, Jan 21, 2026 at 7:30 PM Chao Li <[email protected]> wrote:
> >
> >
> >
> > > On Jan 21, 2026, at 16:22, Peter Smith <[email protected]> wrote:
> > >
> > > On Wed, Jan 21, 2026 at 7:05 PM Chao Li <[email protected]> wrote:
> > >>
> > >>
> > >>
> > >>> On Jan 21, 2026, at 10:58, Peter Smith <[email protected]> wrote:
> > >>>
> > >>> A rebase was needed for some more test expected output changes.
> > >>>
> > >>> PSA v2.
> > >>>
> > >>> ======
> > >>> Kind Regards,
> > >>> Peter Smith.
> > >>> Fujitsu Australia
> > >>> <v2-0002-Fix-to-make-psql-d-lists-of-inherits-look-same-as.patch><v2-0001-Fix-to-make-psql-d-lists-of-partitions-look-same-.patch>
> > >>
> > >> I still see some difference:
> > >> ```
> > >> evantest=# \d+ p_test;
> > >>                                     Partitioned table "public.p_test"
> > >>  Column  |  Type   | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
> > >> ----------+---------+-----------+----------+---------+----------+-------------+--------------+-------------
> > >> id       | integer |           |          |         | plain    |             |              |
> > >> username | text    |           |          |         | extended |             |              |
> > >> category | text    |           |          |         | extended |             |              |
> > >> Partition key: LIST (category)
> > >> Indexes:
> > >>    "idx_p_test_id" btree (id)
> > >> Partitions:
> > >>    p_test_v1 FOR VALUES IN ('A')
> > >>    p_test_v2 FOR VALUES IN ('B')
> > >> ```
> > >>
> > >> The index name is quoted, but the partition names are not.
> > >>
> > >
> > > AFAICT
> > > Indexes are quoted
> > > Constraints are quoted
> > > Publications are also quoted
> > >
> > > Partitions are NOT quoted
> > > Inherits are NOT quoted
> > >
> > > ~
> > >
> > > Please confirm --- So, you are expecting that Partitions and Child
> > > tables should also be quoted, so that everything looks the same?
> > >
> > > This is scope creep from the original intent of this thread, so I will
> > > look at doing this in a separate patch 0003.
> > >
> > > ======
> > > Kind Regards
> > > Peter Smith.
> > > Fujitsu Australia
> >
> > Actually I don’t know the rule, which should be quoted and which should not. Is the inconstancy a blocker?
> >
> > So, I was just pointing out the inconsistency, and I want to hear a clarification from someone.
> >
>
> OK. I feel that the "Partitions" and "Child tables" + "Interits" might
> be the odd ones out here, just as those were the odd ones out re the
> list indentation logic.
>
> But I will hold off on adding quotes for them until I hear some
> committer advice that it would be a worthwhile change.


I went through the discussions and verified the unpatched psql display
and after tested the v2 patches on the current master. The patches
applied cleanly, make check and tests passed successfully and using
the patches confirms that "Partitions" and "Child tables" are now
displayed consistently as intended. LGTM from my side.

Regards,
Soumya






^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-03-20 03:48  Peter Smith <[email protected]>
  parent: Soumya S Murali <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Smith @ 2026-03-20 03:48 UTC (permalink / raw)
  To: PostgreSQL Hackers <[email protected]>; +Cc: Chao Li <[email protected]>; Soumya S Murali <[email protected]>

Ping, This thread has been idle for about 6 weeks but AFAIK the patch
is good to go.

Is there any else I can do to help move it forwards?

======
Kind Regards,
Peter Smith.
Fujitsu Australia





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-03-26 03:18  Fujii Masao <[email protected]>
  parent: Peter Smith <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Fujii Masao @ 2026-03-26 03:18 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Chao Li <[email protected]>; Soumya S Murali <[email protected]>

On Fri, Mar 20, 2026 at 12:49 PM Peter Smith <[email protected]> wrote:
>
> Ping, This thread has been idle for about 6 weeks but AFAIK the patch
> is good to go.
>
> Is there any else I can do to help move it forwards?

I like the updated \d+ display. The patch looks good to me.
So, barring objections, I'm thinking to commit it.

BTW, with these changes there appear to be no remaining callers of
pg_wcswidth() in the core. I'm not sure if we should remove it,
or keep it for reference or potential external use, though.

Regards,

-- 
Fujii Masao





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-03-30 02:23  Fujii Masao <[email protected]>
  parent: Fujii Masao <[email protected]>
  0 siblings, 1 reply; 13+ messages in thread

From: Fujii Masao @ 2026-03-30 02:23 UTC (permalink / raw)
  To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Chao Li <[email protected]>; Soumya S Murali <[email protected]>

On Thu, Mar 26, 2026 at 12:18 PM Fujii Masao <[email protected]> wrote:
>
> On Fri, Mar 20, 2026 at 12:49 PM Peter Smith <[email protected]> wrote:
> >
> > Ping, This thread has been idle for about 6 weeks but AFAIK the patch
> > is good to go.
> >
> > Is there any else I can do to help move it forwards?
>
> I like the updated \d+ display. The patch looks good to me.
> So, barring objections, I'm thinking to commit it.

I've pushed the patches. Thanks!

Regards,

-- 
Fujii Masao





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: Fix how some lists are displayed by psql \d+
@ 2026-03-30 21:55  Peter Smith <[email protected]>
  parent: Fujii Masao <[email protected]>
  0 siblings, 0 replies; 13+ messages in thread

From: Peter Smith @ 2026-03-30 21:55 UTC (permalink / raw)
  To: Fujii Masao <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Chao Li <[email protected]>; Soumya S Murali <[email protected]>

On Mon, Mar 30, 2026 at 1:23 PM Fujii Masao <[email protected]> wrote:
>
> On Thu, Mar 26, 2026 at 12:18 PM Fujii Masao <[email protected]> wrote:
> >
> > On Fri, Mar 20, 2026 at 12:49 PM Peter Smith <[email protected]> wrote:
> > >
> > > Ping, This thread has been idle for about 6 weeks but AFAIK the patch
> > > is good to go.
> > >
> > > Is there any else I can do to help move it forwards?
> >
> > I like the updated \d+ display. The patch looks good to me.
> > So, barring objections, I'm thinking to commit it.
>
> I've pushed the patches. Thanks!
>

Thanks for pushing!

======
Kind Regards,
Peter Smith.
Fujitsu Australia





^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2026-03-30 21:55 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-08 22:47 Fix how some lists are displayed by psql \d+ Peter Smith <[email protected]>
2026-01-09 00:45 ` Chao Li <[email protected]>
2026-01-20 22:24 ` Peter Smith <[email protected]>
2026-01-21 02:58 ` Peter Smith <[email protected]>
2026-01-21 08:04   ` Chao Li <[email protected]>
2026-01-21 08:22     ` Peter Smith <[email protected]>
2026-01-21 08:30       ` Chao Li <[email protected]>
2026-01-21 21:08         ` Peter Smith <[email protected]>
2026-02-04 05:00           ` Soumya S Murali <[email protected]>
2026-03-20 03:48             ` Peter Smith <[email protected]>
2026-03-26 03:18               ` Fujii Masao <[email protected]>
2026-03-30 02:23                 ` Fujii Masao <[email protected]>
2026-03-30 21:55                   ` Peter Smith <[email protected]>

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