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: Andres Freund <andres(at)anarazel(dot)de>, 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-09-18 10:37:51
Message-ID: CAPpHfdvO91yfV9jSE228u_qkd2=YZCNLYH2YT6LBdRJO2wdZAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 17, 2019 at 9:01 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> It seems strange that there's a way to display AMs, and a way to display
> ops and procs in an opfamily; but there's no way to list what opfamilies
> exist (possibly given an AM as pattern). Should we add that too? We
> had \dAf in the original submission, but that seems to have lost along
> the way, not sure why.
>
> 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).
>
> On the other hand, from a user perspective, what you really want to know
> is: what opfamilies exist for datatype T, and what operators are
> supported by the opfamily I have chosen? The current patch doesn't
> really help you find that out.

I think you have a point. Will add \dAf command to the patch.

> I think \dAp isn't terribly informative from a user perspective. The
> support procs are just an opfamily implementation detail.

I've expressed my opinion regarding \dAp in [1]. In my observations,
some advanced users can write btree/hash opclasses in pl/* languages.
This doesn't require knowledge of core developer. And they may find
\dAp command useful. What do you think?

Links
1. https://www.postgresql.org/message-id/CAPpHfdtj_w20hTr4fHW4MnpL-pPGU3Mw0A9pRTRBL_XP-WGsyQ%40mail.gmail.com

------
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 Dilip Kumar 2019-09-18 10:47:45 Re: pgbench - allow to create partitioned tables
Previous Message Alexander Korotkov 2019-09-18 10:29:35 Re: Define jsonpath functions as stable