mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Allow psql's \df and \do commands to specify argument types.
When dealing with overloaded function or operator names, having to look through a long list of matches is tedious. Let's extend these commands to allow specification of (input) argument types to let such results be trimmed down. Each additional argument is treated the same as the pattern argument of \dT and matched against the appropriate argument's type name. While at it, fix \dT (and these new options) to recognize the usual notation of "foo[]" for "the array type over foo", and to handle the special abbreviations allowed by the backend grammar, such as "int" for "integer". Greg Sabino Mullane, revised rather significantly by me Discussion: https://postgr.es/m/CAKAnmmLF9Hhu02N+s7uAyLc5J1xZReg72HQUoiKhNiJV3_jACQ@mail.gmail.com
This commit is contained in:
@ -166,7 +166,7 @@ slashUsage(unsigned short int pager)
|
||||
* Use "psql --help=commands | wc" to count correctly. It's okay to count
|
||||
* the USE_READLINE line even in builds without that.
|
||||
*/
|
||||
output = PageOutput(133, pager ? &(pset.popt.topt) : NULL);
|
||||
output = PageOutput(135, pager ? &(pset.popt.topt) : NULL);
|
||||
|
||||
fprintf(output, _("General\n"));
|
||||
fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
|
||||
@ -240,7 +240,8 @@ slashUsage(unsigned short int pager)
|
||||
fprintf(output, _(" \\des[+] [PATTERN] list foreign servers\n"));
|
||||
fprintf(output, _(" \\deu[+] [PATTERN] list user mappings\n"));
|
||||
fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data wrappers\n"));
|
||||
fprintf(output, _(" \\df[anptw][S+] [PATRN] list [only agg/normal/procedures/trigger/window] functions\n"));
|
||||
fprintf(output, _(" \\df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]]\n"));
|
||||
fprintf(output, _(" list [only agg/normal/procedure/trigger/window] functions\n"));
|
||||
fprintf(output, _(" \\dF[+] [PATTERN] list text search configurations\n"));
|
||||
fprintf(output, _(" \\dFd[+] [PATTERN] list text search dictionaries\n"));
|
||||
fprintf(output, _(" \\dFp[+] [PATTERN] list text search parsers\n"));
|
||||
@ -251,7 +252,7 @@ slashUsage(unsigned short int pager)
|
||||
fprintf(output, _(" \\dL[S+] [PATTERN] list procedural languages\n"));
|
||||
fprintf(output, _(" \\dm[S+] [PATTERN] list materialized views\n"));
|
||||
fprintf(output, _(" \\dn[S+] [PATTERN] list schemas\n"));
|
||||
fprintf(output, _(" \\do[S] [PATTERN] list operators\n"));
|
||||
fprintf(output, _(" \\do[S] [OPPTRN [TYPEPTRN [TYPEPTRN]]] list operators\n"));
|
||||
fprintf(output, _(" \\dO[S+] [PATTERN] list collations\n"));
|
||||
fprintf(output, _(" \\dp [PATTERN] list table, view, and sequence access privileges\n"));
|
||||
fprintf(output, _(" \\dP[itn+] [PATTERN] list [only index/table] partitioned relations [n=nested]\n"));
|
||||
|
Reference in New Issue
Block a user