Re: psql \df choose functions by their arguments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql \df choose functions by their arguments
Date: 2021-04-07 21:58:24
Message-ID: 1727740.1617832704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Greg Sabino Mullane <htamfids(at)gmail(dot)com> writes:
>> * SQL error on \df foo a..b as well as one on \df foo (bigint bigint)

> The first one seems to be a bug, will look.

Argh, silly typo (and I'd failed to test the schema-qualified-name case).

While I was thinking about use-cases for this, I realized that at least
for me, being able to restrict \do operator searches by input type would
be even more useful than is true for \df. Operator names tend to be
overloaded even more heavily than functions. So here's a v8 that
also fixes \do in the same spirit.

(With respect to the other point: for \do it does seem to make sense
to constrain the match to operators with exactly as many arguments
as specified. I still say that's a bad idea for functions, though.)

regards, tom lane

Attachment Content-Type Size
v8-psql-df-pick-function-by-type.patch text/x-diff 21.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-04-07 22:04:26 Re: Remove page-read callback from XLogReaderState.
Previous Message Julien Rouhaud 2021-04-07 21:56:25 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?