pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: David Steele <david@pgmasters.net>
Cc: Michael Paquier <michael@paquier.xyz>
Subject: Re: Psql patch to show access methods info
Date: Wed, 18 Sep 2019 11:04:40 -0300
Message-ID: <20190918140440.GA28323@alvherre.pgsql> (raw)
In-Reply-To: <CAPpHfdvO91yfV9jSE228u_qkd2=YZCNLYH2YT6LBdRJO2wdZAA@mail.gmail.com>

On 2019-Sep-18, Alexander Korotkov wrote:

> On Tue, Sep 17, 2019 at 9:01 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> > I think \dAf is just as critical as \dAo; the former lets you know which
> > opfamilies you can use in CREATE INDEX, while the latter lets you know
> > which operators would be helped by such an index.  (But, really, only if
> > the opfamily name is printed in \d of the index, which we currently
> > don't print unless it's non-default ... which is an omission that
> > perhaps we should consider fixing).

> I think you have a point.  Will add \dAf command to the patch.

Great, thanks.

I think in order for this feature to be more complete "\d index" should
show the opfamily name, also, even when it's the default one.  (Let's
not put the opfamily when it's the default in "\d table", as we do when
the opfamily is not default; that would lead, I think, to too much
clutter.)

> > On the other hand, from a user perspective, what you really want to know
> > is: what opfamilies exist for datatype T, and what operators are
> > supported by the opfamily I have chosen?  The current patch doesn't
> > really help you find that out.

I hope that in some future somebody will contribute towards this, which
I think is more important (from users POV) than the below one:

> > I think \dAp isn't terribly informative from a user perspective.  The
> > support procs are just an opfamily implementation detail.
> 
> I've expressed my opinion regarding \dAp in [1].  In my observations,
> some advanced users can write btree/hash opclasses in pl/* languages.
> This doesn't require knowledge of core developer.  And they may find
> \dAp command useful.  What do you think?

I have never tried or had the need to do that.  I'll take your word for
it, so I have no objection.

I do wonder if \? is going to end up with too much clutter, and if so do
we need to make \? show only the most important commands and relegate
some others to \?+ ... however, going over the existing \? I see no
command that I would move to \?+ so \dAp would be alone there, which
would be pretty strange.  So let's forget this angle for now; but if
psql acquires too much "system innards" functionality then I say we
should consider it.

Thanks

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (56+ messages)  latest in thread

Message-ID: <20190918140440.GA28323@alvherre.pgsql>
Permalink:  ../20190918140440.GA28323@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190918140440.GA28323@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, a.korotkov@postgrespro.ru, andres@anarazel.de, n.gluhov@postgrespro.ru, thomas.munro@gmail.com, horiguchi.kyotaro@lab.ntt.co.jp, david@pgmasters.net, michael@paquier.xyz
  Subject: Re: Psql patch to show access methods info
  In-Reply-To: <20190918140440.GA28323@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox