Re: psql \dh: List High-Level (Root) Tables and Indexes

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sadeq Dousti <msdousti@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-02-23T21:38:59Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. psql \dP: list partitioned tables and indexes

Sadeq Dousti <msdousti@gmail.com> writes:
>> "High-level" is not terminology we use anywhere else
>> We do use the terms "root partition" or "partition root".

> I agree "high-level" is not standard, but "root partition" also entails
> the table is actually partitioned. This is not necessarily the case.
> The suggested command will show all non-partitioned tables, plus the
> root partitions.

Hmm, that seems even less derivable from the term "high-level"
than what I thought you meant.  However, if that's the behavior
you want, maybe we could extend "\d[ti...]" with an option that
suppresses partition-tree members?  My first thought about that
is "n" for "not a partition member", but maybe somebody else
can invent a better name.  (One problem with "n" is that "\dn"
without either "t" or "i" would mean something else.  Using "N"
would fix that, but the capitalization seems a bit random.)

Independently of that, extending \dP with an option for "roots
only" seems like a good idea.  But that's a different patch.

			regards, tom lane