Commit 5edbcbd5 authored by Tom Lane's avatar Tom Lane

Minor improvements for psql help output.

Fix alphabetization of the output of "\?", and improve one description.

Update PageOutput counts where needed, fixing breakage from previous
patches.

Haiying Tang (PageOutput fixes by me)

Discussion: https://postgr.es/m/OS0PR01MB61136018064660F095CB57A8FB129@OS0PR01MB6113.jpnprd01.prod.outlook.com
parent aa8bd089
...@@ -166,7 +166,7 @@ slashUsage(unsigned short int pager) ...@@ -166,7 +166,7 @@ slashUsage(unsigned short int pager)
* Use "psql --help=commands | wc" to count correctly. It's okay to count * Use "psql --help=commands | wc" to count correctly. It's okay to count
* the USE_READLINE line even in builds without that. * the USE_READLINE line even in builds without that.
*/ */
output = PageOutput(135, pager ? &(pset.popt.topt) : NULL); output = PageOutput(136, pager ? &(pset.popt.topt) : NULL);
fprintf(output, _("General\n")); fprintf(output, _("General\n"));
fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n")); fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
...@@ -236,8 +236,8 @@ slashUsage(unsigned short int pager) ...@@ -236,8 +236,8 @@ slashUsage(unsigned short int pager)
fprintf(output, _(" \\dD[S+] [PATTERN] list domains\n")); fprintf(output, _(" \\dD[S+] [PATTERN] list domains\n"));
fprintf(output, _(" \\ddp [PATTERN] list default privileges\n")); fprintf(output, _(" \\ddp [PATTERN] list default privileges\n"));
fprintf(output, _(" \\dE[S+] [PATTERN] list foreign tables\n")); fprintf(output, _(" \\dE[S+] [PATTERN] list foreign tables\n"));
fprintf(output, _(" \\det[+] [PATTERN] list foreign tables\n"));
fprintf(output, _(" \\des[+] [PATTERN] list foreign servers\n")); fprintf(output, _(" \\des[+] [PATTERN] list foreign servers\n"));
fprintf(output, _(" \\det[+] [PATTERN] list foreign tables\n"));
fprintf(output, _(" \\deu[+] [PATTERN] list user mappings\n")); fprintf(output, _(" \\deu[+] [PATTERN] list user mappings\n"));
fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data wrappers\n")); fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data wrappers\n"));
fprintf(output, _(" \\df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]]\n" fprintf(output, _(" \\df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]]\n"
...@@ -257,7 +257,7 @@ slashUsage(unsigned short int pager) ...@@ -257,7 +257,7 @@ slashUsage(unsigned short int pager)
fprintf(output, _(" \\dO[S+] [PATTERN] list collations\n")); fprintf(output, _(" \\dO[S+] [PATTERN] list collations\n"));
fprintf(output, _(" \\dp [PATTERN] list table, view, and sequence access privileges\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")); fprintf(output, _(" \\dP[itn+] [PATTERN] list [only index/table] partitioned relations [n=nested]\n"));
fprintf(output, _(" \\drds [PATRN1 [PATRN2]] list per-database role settings\n")); fprintf(output, _(" \\drds [ROLEPTRN [DBPTRN]] list per-database role settings\n"));
fprintf(output, _(" \\dRp[+] [PATTERN] list replication publications\n")); fprintf(output, _(" \\dRp[+] [PATTERN] list replication publications\n"));
fprintf(output, _(" \\dRs[+] [PATTERN] list replication subscriptions\n")); fprintf(output, _(" \\dRs[+] [PATTERN] list replication subscriptions\n"));
fprintf(output, _(" \\ds[S+] [PATTERN] list sequences\n")); fprintf(output, _(" \\ds[S+] [PATTERN] list sequences\n"));
...@@ -347,7 +347,7 @@ helpVariables(unsigned short int pager) ...@@ -347,7 +347,7 @@ helpVariables(unsigned short int pager)
* Windows builds currently print one more line than non-Windows builds. * Windows builds currently print one more line than non-Windows builds.
* Using the larger number is fine. * Using the larger number is fine.
*/ */
output = PageOutput(158, pager ? &(pset.popt.topt) : NULL); output = PageOutput(160, pager ? &(pset.popt.topt) : NULL);
fprintf(output, _("List of specially treated variables\n\n")); fprintf(output, _("List of specially treated variables\n\n"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment