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

From Alexander Korotkov
Subject Re: Psql patch to show access methods info
Date
Msg-id CAPpHfdtx0k7VcMBEggchbejA=aB09YbOsZdf=hvTxsKMVAtuWQ@mail.gmail.com
Whole thread Raw
In response to Re: Psql patch to show access methods info  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Psql patch to show access methods info
List pgsql-hackers
On Wed, Sep 18, 2019 at 5:04 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> On 2019-Sep-18, Alexander Korotkov wrote:
>
> > On Tue, Sep 17, 2019 at 9:01 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> > > I think \dAf is just as critical as \dAo; the former lets you know which
> > > opfamilies you can use in CREATE INDEX, while the latter lets you know
> > > which operators would be helped by such an index.  (But, really, only if
> > > the opfamily name is printed in \d of the index, which we currently
> > > don't print unless it's non-default ... which is an omission that
> > > perhaps we should consider fixing).
>
> > I think you have a point.  Will add \dAf command to the patch.
>
> Great, thanks.

Revised patch is attached.

1) It adds \dAf[+] command showing opfamilies, which belong to given
AM and have opclasses for given datatype.
2) It turns back warning when running \dA[+] with 2 or more arguments.

Two questions are open for me:

1) Currently we allow to filter opfamilies by type, but supported
types aren't displayed.  Should we display datatypes?  Should we
aggregate them into comma-separated list?
2) Given we now can display the list of opfamilies, it would be
reasonable to be able to see list of opclasses belonging to particular
opfamily.  But currently \dAc doesn't have filter by opclass.  Should
we implement this as an separate command?

I'll be very glad for feedback.

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

Attachment

pgsql-hackers by date:

Previous
From: Steven Pousty
Date:
Subject: Re: JSONPATH documentation
Next
From: Andrew Dunstan
Date:
Subject: Re: subscriptionCheck failures on nightjar