Re: Psql patch to show access methods info

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, 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 12:58:38
Message-ID: CAPpHfdutU3EzFOX8r8HC3me+Zcw02=_WfqDVWQ_ENBX5wD8j3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2019-07-22 13:09:48 Re: GiST VACUUM
Previous Message Julien Rouhaud 2019-07-22 12:40:19 Re: Add parallelism and glibc dependent only options to reindexdb