Re: [HACKERS] PATCH: psql show index with type info - Mailing list pgsql-hackers

From Amos Bird
Subject Re: [HACKERS] PATCH: psql show index with type info
Date
Msg-id 87d1du1o0v.fsf@t450s
Whole thread Raw
In response to Re: [HACKERS] PATCH: psql show index with type info  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [HACKERS] PATCH: psql show index with type info  (Stephen Frost <sfrost@snowman.net>)
Re: [HACKERS] PATCH: psql show index with type info  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
Hello Stephen,

Well, the prefix is used to differentiate other \d commands, like
this,

amos=# \ditv                     List of relationsSchema |        Name        |     Type     | Owner |  Table
--------+--------------------+--------------+-------+---------public | i                  | table        | amos
|public| ii                 | index: gist  | amos  | ipublic | j                  | table        | amos  |public | jj
             | index: gin   | amos  | ipublic | jp                 | index: btree | amos  | ipublic | js
| index: brin  | amos  | ipublic | numbers            | table        | amos  |public | numbers_mod2       | index: gin
| amos  | numberspublic | numbers_mod2_btree | index: btree | amos  | numberspublic | ts                 | table
|amos  |
 
(10 rows)

regards,
Amos

Stephen Frost <sfrost@snowman.net> writes:

> Greetings,
>
> * Amos Bird (amosbird@gmail.com) wrote:
>> 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,
>
> Agreed.
>
>>  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.
>
> I'm not sure why it's useful to keep the 'index:'?  I would suggest we
> just drop that and keep only the actual index type (gist, gin, etc).
>
> Thanks!
>
> Stephen




pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: [HACKERS] PATCH: Configurable file mode mask
Next
From: David Steele
Date:
Subject: Re: [HACKERS] ANALYZE command progress checker