Re: Psql patch to show access methods info - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Psql patch to show access methods info
Date
Msg-id 20190722173704.5v6wcyqrhmusehow@alap3.anarazel.de
Whole thread Raw
In response to Re: Psql patch to show access methods info  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
List 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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: POC: converting Lists into arrays
Next
From: Andres Freund
Date:
Subject: Re: initdb recommendations