Re: psql \df choose functions by their arguments
Ian Lawrence Barwick <barwick@gmail.com>
From: Ian Lawrence Barwick <barwick@gmail.com>
To: Greg Sabino Mullane <htamfids@gmail.com>
Cc: "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>,
Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-01-11T07:45:36Z
Lists: pgsql-hackers
Attachments
- funcargs.diff (text/x-patch) patch
Hi I tried this patch out last year but was overrolled by Other Stuff before I got around to providing any feedback, and was reminded of it just now when I was trying to execute "\df somefunction text int" or similar, which had me confused until I remembered it's not a feature yet, so it would certainly be very welcome to have this. 2020年11月3日(火) 23:27 Greg Sabino Mullane <htamfids@gmail.com>: > > Thanks for looking this over! > >> >> some Abbreviations of common types are not added to the type_abbreviations[] Such as: >> >> Int8 => bigint > > > I wasn't aiming to provide a canonical list, as I personally have never seen > anyone use int8 instead of bigint when (for example) creating a function, but > I'm not strongly opposed to expanding the list. I have vague memories of working with "int8" a bit (possibly related to an Informix migration), anyway it seems easy enough to add them for completeness as someone (possibly migrating from another database) might wonder why it's not working. Just a small code readability suggestion - in exec_command_d(), it seems neater to put the funcargs declaration in a block together with the code with which uses it (see attached diff). Regards Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com
Commits
-
Allow psql's \df and \do commands to specify argument types.
- a3027e1e7f3d 14.0 landed