Psql patch to show access methods info - Mailing list pgsql-hackers

From Sergey Cherkashin
Subject Psql patch to show access methods info
Date
Msg-id 1529675324.14193.5.camel@postgrespro.ru
Whole thread Raw
Responses Re: Psql patch to show access methods info
List pgsql-hackers
Hello!

There are command in psql to list access methods, but there are no fast
way to look detailed info about them. So here a patch with new
commands:

\dAp     [PATTERN]           list access methods with properties (Table
pg_am)
\dAf[+]  [AMPTRN [OPFPTRN]]  list operator families of access method. +
prints owner of operator family. (Table pg_opfamily) 
\dAfp    [AMPTRN [OPFPTRN]]  list procedures of operator family related
to access method (Table pg_amproc)
\dAfo    [AMPTRN [OPFPTRN]]  list operators of family related to access
method (Table pg_amop)
\dAoc[+] [AMPTRN [OPCPTRN]]  list operator classes of index access
methods. + prints owner of operator class. (Table pg_opclass)
\dip[S]  [PATTERN]           list indexes with properties (Table
pg_class)
\dicp[S] [IDXNAME [COLNAME]] show index column properties (Table
pg_class)

You can display information only on the access methods, specified by a
template. You can also filter operator classes, operator families, or
the name of the indexed column.

I also have a question about testing commands \dAf+ and \dAoc+: is it
good idea to test them by changing an owner of one operator family or
class to created new one, checking the output, and restoring the owner
back? Or we should create a new opclass or opfamily with proper owner.
Or maybe it is not necesary to test these commands?

Best regards,
Sergey Cherkashin
s.cherkashin@postgrespro.ru
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: PSA: --enable-coverage interferes with parallel query scheduling
Next
From: Alvaro Herrera
Date:
Subject: Re: Fix some error handling for read() and errno