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)
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company