From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
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-01-21 22:33:29 |
Message-ID: | 20200121223329.GA18317@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
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.
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?
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.
[*]
SELECT DISTINCT am.amname AS "AM",
CASE
WHEN pg_catalog.pg_opfamily_is_visible(f.oid)
THEN format('%I', f.opfname)
ELSE format('%I.%I', n.nspname, f.opfname)
END AS "Operator family",
string_agg(format_type(c.opcintype, -1), ', ') as "Applicable types",
pg_catalog.pg_get_userbyid(f.opfowner) AS "Owner"
FROM pg_catalog.pg_opfamily f
LEFT JOIN pg_catalog.pg_am am on am.oid = f.opfmethod
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = f.opfnamespace
left join pg_catalog.pg_opclass c on (f.oid = c.opcfamily)
group by 1, 2, 4 ORDER BY 1, 2;
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2020-01-21 22:34:55 | Re: making the backend's json parser work in frontend code |
Previous Message | Daniel Gustafsson | 2020-01-21 21:59:50 | Re: Minor issues in .pgpass |