Re: pgsql: Show opclass and opfamily related information in psql

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Alexander Korotkov <akorotkov(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, s(dot)cherkashin(at)postgrespro(dot)ru
Subject: Re: pgsql: Show opclass and opfamily related information in psql
Date: 2020-05-14 09:52:10
Message-ID: CAPpHfdvfkGz=6JbshtMKNcfJc5AsZqW7Dqy=W3u8gfLRgG8qsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi!

On Tue, May 12, 2020 at 12:09 AM Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> On 2020-Mar-08, Alexander Korotkov wrote:
>
> > Show opclass and opfamily related information in psql
> >
> > This commit provides psql commands for listing operator classes, operator
> > families and its contents in psql. New commands will be useful for exploring
> > capabilities of both builtin opclasses/opfamilies as well as
> > opclasses/opfamilies defined in extensions.
>
> I had chance to use these new commands this morning.

Great, thank you!

> Note how operator for strategy 1 are all together, then strategy 2, and
> so on. But I think we'd prefer the operators to be grouped together for
> the same types (just like \dAp already works); so I would change the clause
> from:
> ORDER BY 1, 2, o.amopstrategy, 3;
> to:
> ORDER BY 1, 2, pg_catalog.format_type(o.amoplefttype, NULL), pg_catalog.format_type(o.amoprighttype, NULL), o.amopstrategy;

+1

> Also, while I'm going about this, ISTM it'd make sense to
> list same-class operators first, followed by cross-class operators.
> That requires to add "o.amoplefttype = o.amoprighttype DESC," after
> "ORDER BY 1, 2,". For brin's integer_minmax_ops, the resulting list
> would have first (bigint,bigint) then (integer,integer) then
> (smallint,smallint), then all the rest:

+1

Nikita, what do you think?

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2020-05-14 09:55:36 pgsql: Fix amcheck for page checks concurrent to replay of btree page d
Previous Message Heikki Linnakangas 2020-05-14 05:41:13 pgsql: Move check for fsync=off so that pendingOps still gets cleared.

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2020-05-14 10:30:31 Re: pgsql: Show opclass and opfamily related information in psql
Previous Message Amit Kapila 2020-05-14 09:41:34 Re: COPY, lock release and MVCC