Re: [Proposal] Add \dAt [AMPTRN [TBLPTRN]] to list tables by Table Access Method in psql

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Srinath Reddy <srinath2133(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Proposal] Add \dAt [AMPTRN [TBLPTRN]] to list tables by Table Access Method in psql
Date: 2025-04-15 14:55:27
Message-ID: CAKAnmmLqWPJcDiLXkrkjOUDHV6kBHpVT+oeFcAFc874XMhgKNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 15, 2025 at 4:57 AM Srinath Reddy <srinath2133(at)gmail(dot)com> wrote:

> - Table Access Methods are increasingly used.
>

Citation needed.

> - There's currently no native `\d`-style way to explore which tables are
> using a given TAM.
>

There's also no way to list which tables are unlogged. Or which have
autovacuum disabled. Or which belong to a specific tablespace. All of which
are arguably more commonly requested than a TAM.

Perhaps there could be a more generic table-filtering mechanism for \d, but
carving something out for such a niche case seems unwarranted, IMO.

Downstream, you wrote:

> Not everyone wants to write or remember complex queries

True - but you can write a view or a function to support those cases.

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2025-04-15 15:07:42 Re: Built-in Raft replication
Previous Message Tom Lane 2025-04-15 14:52:09 Re: FmgrInfo allocation patterns (and PL handling as staged programming)