Re: psql \df choose functions by their arguments
От | Justin Pryzby |
---|---|
Тема | Re: psql \df choose functions by their arguments |
Дата | |
Msg-id | 20201029042645.GQ5380@telsasoft.com обсуждение исходный текст |
Ответ на | psql \df choose functions by their arguments (Greg Sabino Mullane <htamfids@gmail.com>) |
Ответы |
Re: psql \df choose functions by their arguments
Re: psql \df choose functions by their arguments |
Список | pgsql-hackers |
On Thu, Oct 15, 2020 at 01:21:06PM -0400, Greg Sabino Mullane wrote: > Improve psql \df to choose functions by their arguments I think this is a good idea. This isn't working for arrays: postgres=# \df aa public | aa | integer | integer, integer | func public | aa | integer | integer, integer, integer | func public | aa | integer | integer[], integer, integer | func postgres=# \df aa aa int[] I think it should use the same syntax as \sf and \ef, which require parenthesis and commas, not spaces. int x = 0 while ((functoken = strtokx(x++ ? NULL : funcargs, " \t\n\r", ".,();", "\"", 0, false, true, pset.encoding))) I think x is just used as "initial", so I think you should make it boolean and then set is_initial = false, or similar. + 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. -- Justin
В списке pgsql-hackers по дате отправления: