Re: Psql patch to show access methods info
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>, Andres Freund <andres@anarazel.de>, Nikita Glukhov <n.gluhov@postgrespro.ru>,
Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
David Steele <david@pgmasters.net>
Date: 2020-03-03T23:31:43Z
Lists: pgsql-hackers
Attachments
- 0001-Add-psql-AM-info-commands-v12.patch (application/octet-stream) patch v12-0001
Hi!
Thank you for the review. Revised patch is attached.
On Wed, Jan 22, 2020 at 1:33 AM Alvaro Herrera <alvherre@2ndquadrant.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
Commits
-
Show opclass and opfamily related information in psql
- b0b5e20cd8d1 13.0 landed