pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow psql's \df and \do commands to specify argument types.
Date: Thu, 08 Apr 2021 03:02:33 +0000
Message-ID: <E1lUKwD-0004pn-3e@gemulon.postgresql.org> (raw)

Allow psql's \df and \do commands to specify argument types.

When dealing with overloaded function or operator names, having
to look through a long list of matches is tedious.  Let's extend
these commands to allow specification of (input) argument types
to let such results be trimmed down.  Each additional argument
is treated the same as the pattern argument of \dT and matched
against the appropriate argument's type name.

While at it, fix \dT (and these new options) to recognize the
usual notation of "foo[]" for "the array type over foo", and
to handle the special abbreviations allowed by the backend
grammar, such as "int" for "integer".

Greg Sabino Mullane, revised rather significantly by me

Discussion: https://postgr.es/m/CAKAnmmLF9Hhu02N+s7uAyLc5J1xZReg72HQUoiKhNiJV3_jACQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a3027e1e7f3d3a107ecd72d3b4d6333ea2aab6a5

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml     |  40 ++++++--
src/bin/psql/command.c             |  48 +++++++++-
src/bin/psql/describe.c            | 181 ++++++++++++++++++++++++++++++++++---
src/bin/psql/describe.h            |   8 +-
src/bin/psql/help.c                |   7 +-
src/fe_utils/string_utils.c        |   6 ++
src/test/regress/expected/psql.out | 101 +++++++++++++++++++++
src/test/regress/sql/psql.sql      |  13 +++
8 files changed, 374 insertions(+), 30 deletions(-)



Message-ID: <E1lUKwD-0004pn-3e@gemulon.postgresql.org>
Permalink:  ../E1lUKwD-0004pn-3e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lUKwD-0004pn-3e@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Allow psql's \df and \do commands to specify argument types.
  In-Reply-To: <E1lUKwD-0004pn-3e@gemulon.postgresql.org>
  References: <E1lUKwD-0004pn-3e@gemulon.postgresql.org>

* 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