Re: Psql patch to show access methods info
Nikita Glukhov <n.gluhov@postgrespro.ru>
From: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>,
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
David Steele <david@pgmasters.net>, Michael Paquier <michael@paquier.xyz>
Date: 2019-07-22T20:23:22Z
Lists: pgsql-hackers
Attachments
- 0001-Add-psql-AM-info-commands-v08.patch (text/x-patch)
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@2ndquadrant.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
Commits
-
Show opclass and opfamily related information in psql
- b0b5e20cd8d1 13.0 landed