From: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@postgresql.org
Subject: make \d pg_toast.foo show its indices
Date: Mon, 22 Apr 2019 10:49:02 -0500
Message-ID: <20190422154902.GH14223@telsasoft.com> (raw)
It's deliberate that \dt doesn't show toast tables.
\d shows them, but doesn't show their indices.
It seems to me that their indices should be shown, without having to think and
know to query pg_index.
postgres=# \d pg_toast.pg_toast_2600
TOAST table "pg_toast.pg_toast_2600"
Column | Type
------------+---------
chunk_id | oid
chunk_seq | integer
chunk_data | bytea
Indexes:
"pg_toast_2600_index" PRIMARY KEY, btree (chunk_id, chunk_seq)
Justin
Attachments:
[text/x-diff] slash-d-show-indices-on-toast.patch (517B, ../20190422154902.GH14223@telsasoft.com/2-slash-d-show-indices-on-toast.patch)
download | inline diff:diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.cindex d7390d5..d26d986 100644--- a/src/bin/psql/describe.c+++ b/src/bin/psql/describe.c@@ -2274,6 +2274,7 @@ describeOneTableDetails(const char *schemaname,
else if (tableinfo.relkind == RELKIND_RELATION ||
tableinfo.relkind == RELKIND_MATVIEW ||
tableinfo.relkind == RELKIND_FOREIGN_TABLE ||
+ tableinfo.relkind == RELKIND_TOASTVALUE ||
tableinfo.relkind == RELKIND_PARTITIONED_TABLE)
{
/* Footer information about a table */
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com
Subject: Re: make \d pg_toast.foo show its indices
In-Reply-To: <20190422154902.GH14223@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox