EXCEPT TABLE - Case inconsistency for describe \d and \dRp+
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-10T07:13:15Z
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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
psql: Improve describe footer titles for publications.
- 2e1d4fdb10e6 19 (unreleased) landed
-
Fix capitalization in publication describe output.
- 8f81c9235162 19 (unreleased) landed
-
Allow table exclusions in publications via EXCEPT TABLE.
- fd366065e06a 19 (unreleased) cited