From: | Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, David Steele <david(at)pgmasters(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz> |
Subject: | Re: Psql patch to show access methods info |
Date: | 2019-07-22 20:23:22 |
Message-ID: | 13e8c19b-d487-747f-c8e8-6e7bd584600e@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Attached 8th version of the patches.
On 22.07.2019 15:58, Alexander Korotkov wrote:
> On Mon, Jul 22, 2019 at 6:29 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>> On 2019-Jul-21, Alexander Korotkov wrote:
>>> I've one note. Behavior of "\dA" and "\dA pattern" look
>>> counter-intuitive to me. I would rather expect that "\dA pattern"
>>> would just filter results of "\dA", but it displays different
>>> information. I suggest rename displaying access method properties
>>> from "\dA pattern" to different.
>> \dA+ maybe? Then ...
>>
>>> And leave "\dA pattern" just filter results of "\dA".
>> "\dA+ pattern" works intuitively, I think.
> Sounds good for me.
>
> We already have some functionality for \dA+.
>
> # \dA+
> List of access methods
> Name | Type | Handler | Description
> --------+-------+----------------------+----------------------------------------
> brin | index | brinhandler | block range index (BRIN) access method
> btree | index | bthandler | b-tree index access method
> gin | index | ginhandler | GIN index access method
> gist | index | gisthandler | GiST index access method
> hash | index | hashhandler | hash index access method
> heap | table | heap_tableam_handler | heap table access method
> spgist | index | spghandler | SP-GiST index access method
> (7 rows)
>
> What we need is that new \dA+ functionality cover existing one. That
> it, we should add Handler and Description column to the output.
>
> # \dA+ *
> Index access method properties
> AM | Ordering | Unique indexes | Multicol indexes | Exclusion
> constraints | Include non-key columns
> --------+----------+----------------+------------------+-----------------------+-------------------------
> brin | no | no | yes | no
> | no
> btree | yes | yes | yes | yes
> | yes
> gin | no | no | yes | no
> | no
> gist | no | no | yes | yes
> | yes
> hash | no | no | no | yes
> | no
> spgist | no | no | no | yes
> | no
> (6 rows)
>
> Table access method properties
> Name | Type | Handler | Description
> ------+-------+----------------------+--------------------------
> heap | table | heap_tableam_handler | heap table access method
> (1 row)
Columns "Handler" and "Description" were added to \dA+.
\dA [NAME] now shows only amname and amtype.
Also added support for pre-9.6 server versions to both \dA and \dA+.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
0001-Add-psql-AM-info-commands-v08.patch | text/x-patch | 34.1 KB |
0002-Add-psql-index-info-commands-v08.patch | text/x-patch | 17.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Manuel Rigger | 2019-07-22 20:53:20 | Re: Broken defenses against dropping a partitioning column |
Previous Message | Tom Lane | 2019-07-22 20:10:58 | Re: errbacktrace |