pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: output columns of \dAo and \dAp
Date: Sat, 6 Jun 2020 19:15:40 +0200
Message-ID: <2edc7b27-031f-b2b6-0db2-864241c91cb9@2ndquadrant.com> (raw)

I'm somewhat confused by the selection and order of the output columns
produced by the new psql commands \dAo and \dAp (access method operators
and functions, respectively).  Currently, you get

\dAo

 AM  | Operator family |       Operator
-----+-----------------+----------------------
 gin | jsonb_path_ops  | @> (jsonb, jsonb)
...

\dAo+

\dAo+
                                 List of operators of operator families
  AM   | Operator family |                Operator                 | Strategy | Purpose | Sort opfamily
-------+-----------------+-----------------------------------------+----------+---------+---------------
 btree | float_ops       | < (double precision, double precision)  |        1 | search  |
...

\dAp
                        List of support functions of operator families
  AM   | Operator family |  Left arg type   |  Right arg type  | Number |      Function
-------+-----------------+------------------+------------------+--------+---------------------
 btree | float_ops       | double precision | double precision |      1 | btfloat8cmp
...

First, why isn't the strategy number included in the \dAo?  It's part
of the primary key of pg_amop, and it's essential for interpreting the
meaning of the output.

Then there are gratuitous differences in the presentation of \dAo and \dAp.
Why does \dAo show the operator with signature and omit the left arg/right arg
columns, but \dAp shows it the other way around?

I'm also wondering whether this is fully correct.  Would it be possible for the
argument types of the operator/function to differ from the left arg/right arg
types?  (Perhaps binary compatible?)

Either way some more consistency would be welcome.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (12+ messages)  latest in thread

Message-ID: <2edc7b27-031f-b2b6-0db2-864241c91cb9@2ndquadrant.com>
Permalink:  ../2edc7b27-031f-b2b6-0db2-864241c91cb9@2ndquadrant.com/
Also on:    postgresql.org/message-id/2edc7b27-031f-b2b6-0db2-864241c91cb9@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com
  Subject: Re: output columns of \dAo and \dAp
  In-Reply-To: <2edc7b27-031f-b2b6-0db2-864241c91cb9@2ndquadrant.com>

* 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