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-08 02:00:08 |
Message-ID: | 1767656.1617847208@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> I had an idea about that. I've not tested this, but I think it would be
> a trivial matter of adding a coalesce() call to make the query act like
> the type name for a not-present argument is an empty string, rather than
> NULL which is what it gets right now. Then you could do what I think
> you're asking for with
> \df foo integer ""
Actually, what would make more sense is to treat "-" as specifying
a non-existent argument. There are precedents for that in, eg, \c,
and a dash is a little more robust than an empty-string argument.
So that leads me to 0001 attached.
> As for the point about "int" versus "integer" and so on, I wouldn't
> be averse to installing a mapping layer for that, so long as we
> did it to \dT as well.
And for that, I suggest 0002. (We only need mappings for cases that
don't work out-of-the-box, so your list seemed a bit redundant.)
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v9-0001-pick-functions-by-type.patch | text/x-diff | 23.0 KB |
v9-0002-simplify-use-of-dT.patch | text/x-diff | 4.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2021-04-08 02:09:13 | Re: Race condition in InvalidateObsoleteReplicationSlots() |
Previous Message | Kohei KaiGai | 2021-04-08 01:56:08 | Re: TRUNCATE on foreign table |