EXCEPT TABLE - Case inconsistency for describe \d and \dRp+

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: EXCEPT TABLE - Case inconsistency for describe \d and \dRp+
Date: 2026-04-10 07:13:15
Message-ID: CAHut+Pt3t_tCYwDStkj5fG4Z=YXrHvPBA7iGdh745QipC5zKeg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

While experimenting with "CREATE PUBLICATION ... FOR ALL TABLES EXCEPT
(TABLE...)" I noticed a small "case" inconsistency.

Background: The \d and \dRp+ command were enhanced in commit fd36606
[1][2] to say what tables are excluded from what publications.

e.g.

# -- describe the publications
# \dRp+ pub1
Publication pub1
Owner | All tables | All sequences | Inserts | Updates | Deletes |
Truncates | Generated columns | Via root | Description
----------+------------+---------------+---------+---------+---------+-----------+-------------------+----------+-------------
postgres | t | f | t | t | t | t
| none | f |

Except tables:
"public.t1"
"public.t2"

# \dRp+ pub2
Publication pub2
Owner | All tables | All sequences | Inserts | Updates | Deletes |
Truncates | Generated columns | Via root | Description
----------+------------+---------------+---------+---------+---------+-----------+-------------------+----------+-------------
postgres | f | f | t | t | t | t
| none | f |
Tables:
"public.t2"
"public.t3"

# -- describe the tables
# \d t1
Table "public.t1"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | |
Except Publications:
"pub1"

# \d t2
Table "public.t2"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | |

Publications:
"pub2"
Except Publications:
"pub1"

~~~

Notice that that the describe publication says:
"Tables:" and "Except tables:" (Lowercase "tables")

Notice that the describe table says:
"Publications:" and "Except Publications:" (Uppercase "Publications")

I think they should use a consistent case:
eg1. (both lowercase) Except tables; Except publications, OR
eg2. (bother uppercase) Except Tables; Except Publications

~~~

I did not yet provide a patch because I was not sure which way
(uppercase/lowercase) is best, so wanted to hear some opinions about
that first.

(I'm expecting that some DOCS examples and/or TESTS for "describe"
will also be impacted).

Thoughts?

======
[1] https://github.com/postgres/postgres/commit/fd366065e06ae953c4f2d973d5c5f0474f3b87b6#diff-cdb325f8994210a4cfacc19525f11e9b368a3f78641b67105c105449df9b645cR6859
[2] https://github.com/postgres/postgres/commit/fd366065e06ae953c4f2d973d5c5f0474f3b87b6#diff-cdb325f8994210a4cfacc19525f11e9b368a3f78641b67105c105449df9b645cR3183

Kind Regards,
Peter Smith.
Fujitsu Australia

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Fittl 2026-04-10 07:28:56 Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Previous Message Lukas Fittl 2026-04-10 07:12:00 Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?