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: Michael Paquier <michael(at)paquier(dot)xyz>, 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>
Subject: Re: Psql patch to show access methods info
Date: 2020-03-03 23:31:43
Message-ID: CAPpHfdsf6B5qBWy2dRw8cWBmcfVSe7+oa7fc+ayq=Hs-AKWFeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Thank you for the review. Revised patch is attached.

On Wed, Jan 22, 2020 at 1:33 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> I think I would like this feature to be in, but I'm not sure that the
> shape is final yet. My points:
>
> a) I don't see any use for \dA as presented; I think the \dA+ output is
> useful. Therefore my preference would be that \dA presents what the
> latest patch has as \dA+. I think we should leave \dA+ unimplemented
> for now; maybe we can use some use for it later on.

Neither \dA or \dA+ are introduced or affected by this patch. If we
like to change their behavior, we should probably do this separately
from this patch.

> b) I think \dAp should list the function used for each support proc. I
> don't have any use for \dAp actually (I already said that upthread,
> sorry for repeating myself), but I think that if we have it, then
> showing only the proc number is pointless.

It was shown by \dAp+. But I agree that it's essential information
that is unreasonable to hide under verbose option. So, procedure name
is always shown now. I've also renamed "Support function" column to
"Number".

> c) it would be damn handy if \dAf (maybe \dAf+) lists the datatypes that
> each opfamily has opclasses for. Maybe make the output an array, like
> {int4,int8,numeric,...} Something like [*] but somehow make it
> prettier?

I made this change, but using subselect in target list. It's probably
slower query, but better code readability IMHO.

> d) This one I'm unsure about: should we list the opfamily for each
> opclass in \dAc? I'm not sure whether it's useful for anything.

It's already shown by \dAc+ and I think this behavior is fine.

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

Attachment Content-Type Size
0001-Add-psql-AM-info-commands-v12.patch application/octet-stream 30.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2020-03-03 23:37:36 Cast to uint16 in pg_checksum_page()
Previous Message Kyotaro Horiguchi 2020-03-03 23:12:54 Back-patching -Wno-format-truncation.