Re: Psql patch to show access methods info

From: Andres Freund <andres(at)anarazel(dot)de>
To: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
Cc: 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>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Psql patch to show access methods info
Date: 2019-07-23 02:40:27
Message-ID: 20190723024027.ljzigk4bn5rv5v5e@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-07-15 22:03:31 +0300, Nikita Glukhov wrote:
> + <varlistentry>
> + <term>
> + <literal>\dAc[+]
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">access-method-pattern</replaceable></link>
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">input-type-pattern</replaceable></link>]]
> + </literal>
> + </term>
> + <listitem>
> + <para>
> + Shows info index access method operator classes listed in
> + <xref linkend="catalog-pg-opclass-table"/>.
> + If <replaceable class="parameter">access-method-patttern</replaceable>
> + is specified, only operator classes associated with access method whose
> + name matches pattern are shown.
> + If <replaceable class="parameter">input-type-pattern</replaceable>
> + is specified, only procedures associated with families whose input type
> + matches the pattern are shown.
> + If <literal>+</literal> is appended to the command name, operator family
> + and owner are listed.
> + </para>
> + </listitem>
> + </varlistentry>
> +
> + <varlistentry>
> + <term>
> + <literal>\dAo[+]
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">access-method-pattern</replaceable></link>
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">operator-family-pattern</replaceable></link>]]
> + </literal>
> + </term>
> +
> + <listitem>
> + <para>
> + Lists operators (<xref linkend="catalog-pg-amop-table"/>) associated
> + with access method operator families. If
> + <replaceable class="parameter">access-method-patttern</replaceable> is
> + specified, only operators associated with access method whose name
> + matches pattern are shown. If
> + <replaceable class="parameter">operator-family-pattern</replaceable> is
> + specified, only operators associated with families whose name matches
> + the pattern are shown.
> + If <literal>+</literal> is appended to the command name, displays
> + additional info.
> + </para>
> + </listitem>
> + </varlistentry>
> +
> + <varlistentry>
> + <term>
> + <literal>\dAp[+]
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">access-method-pattern</replaceable></link>
> + [<link linkend="app-psql-patterns"><replaceable class="parameter">operator-family-pattern</replaceable></link>]]
> + </literal>
> + </term>
> + <listitem>
> + <para>
> + Lists procedures (<xref linkend="catalog-pg-amproc-table"/>) associated
> + with access method operator families.
> + If <replaceable class="parameter">access-method-patttern</replaceable>
> + is specified, only procedures associated with access method whose name
> + matches pattern are shown.
> + If <replaceable class="parameter">operator-family-pattern</replaceable>
> + is specified, only procedures associated with families whose name
> + matches the pattern are shown.
> + If <literal>+</literal> is appended to the command name, procedures
> + listed with its names.
> </para>

Based on a quick skim of the thread - which means I most definitely
missed things - there's not been discussion of why we actually want to
add this. Who's the prospective user of this facility? And why wouldn't
they just query pg_am[proc]? None of this information seems like it's
going to be even remotely targeted towards even advanced users. For
developers it's not clear what these add?

Adding stuff to psql isn't free. It adds clutter to psql's help output,
the commands need to be maintained (including cross-version code).

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-07-23 02:41:39 Re: Psql patch to show access methods info
Previous Message David Rowley 2019-07-23 02:22:03 Re: Change ereport level for QueuePartitionConstraintValidation