PATCH: psql show index with type info

From: Amos Bird <amosbird(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: PATCH: psql show index with type info
Date: 2017-03-06 11:24:26
Message-ID: 87fuiq1wd1.fsf@t450s
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


psql currently supports \di+ to view indexes,

List of relations
Schema | Name | Type | Owner | Table | Size | Description
--------+--------------------+-------+-------+---------+--------+-------------
public | ii | index | amos | i | 131 MB |
public | jj | index | amos | i | 12 MB |
public | kk | index | amos | i | 456 kB |
public | numbers_mod2 | index | amos | numbers | 10 MB |
public | numbers_mod2_btree | index | amos | numbers | 214 MB |
(5 rows)

The co
lumn "Type" is kinda useless (all equals to index). Representing
the actual index type will be more interesting,

Schema | Name | Type | Owner | Table | Size | Description
--------+--------------------+--------------+-------+---------+--------+-------------
public | ii | index: gist | amos | i | 131 MB |
public | jj | index: gin | amos | i | 12 MB |
public | kk | index: btree | amos | i | 456 kB |
public | numbers_mod2 | index: gin | amos | numbers | 10 MB |
public | numbers_mod2_btree | index: btree | amos | numbers | 214 MB |
(5 rows)

I'm not sure where to add documentations about this patch or if needed one. Please help
me if you think this patch is useful.

Best regards,
Amos

Attachment Content-Type Size
0001_psql_show_index_with_type.v1.patch text/x-diff 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2017-03-06 11:27:10 Re: Parallel Index Scans
Previous Message Petr Jelinek 2017-03-06 10:27:43 Re: Logical replication existing data copy