Re: psql \df choose functions by their arguments
Greg Sabino Mullane <htamfids@gmail.com>
From: Greg Sabino Mullane <htamfids@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org
Date: 2020-10-30T00:35:20Z
Lists: pgsql-hackers
Thank you for looking this over. > This isn't working for arrays: > ... > postgres=# \df aa aa int[] > Arrays should work as expected, I think you have one too many "aa" in there? > I think it should use the same syntax as \sf and \ef, which require > parenthesis > and commas, not spaces. > Hmm, that will not allow partial matches if we require a closing parens. Right now both commas and parens are accepted, but optional. > I think x is just used as "initial", so I think you should make it boolean > and > then set is_initial = false, or similar. > Good suggestion, it is done. > + > pg_strcasecmp(functoken, "bool") == 0 ? "'boolean'" > > I think writing this all within a call to appendPQExpBuffer() is excessive. > You can make an array or structure to search through and then append the > result > to the buffer. > Hmm, like a custom struct we loop through? I will look into implementing that and submit a new patch. Cheers, Greg
Commits
-
Allow psql's \df and \do commands to specify argument types.
- a3027e1e7f3d 14.0 landed