Skip to content

Commit 5edbcbd

Browse files
committed
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
1 parent aa8bd08 commit 5edbcbd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bin/psql/help.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ slashUsage(unsigned short int pager)
166166
* Use "psql --help=commands | wc" to count correctly. It's okay to count
167167
* the USE_READLINE line even in builds without that.
168168
*/
169-
output = PageOutput(135, pager ? &(pset.popt.topt) : NULL);
169+
output = PageOutput(136, pager ? &(pset.popt.topt) : NULL);
170170

171171
fprintf(output, _("General\n"));
172172
fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
@@ -236,8 +236,8 @@ slashUsage(unsigned short int pager)
236236
fprintf(output, _(" \\dD[S+] [PATTERN] list domains\n"));
237237
fprintf(output, _(" \\ddp [PATTERN] list default privileges\n"));
238238
fprintf(output, _(" \\dE[S+] [PATTERN] list foreign tables\n"));
239-
fprintf(output, _(" \\det[+] [PATTERN] list foreign tables\n"));
240239
fprintf(output, _(" \\des[+] [PATTERN] list foreign servers\n"));
240+
fprintf(output, _(" \\det[+] [PATTERN] list foreign tables\n"));
241241
fprintf(output, _(" \\deu[+] [PATTERN] list user mappings\n"));
242242
fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data wrappers\n"));
243243
fprintf(output, _(" \\df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]]\n"
@@ -257,7 +257,7 @@ slashUsage(unsigned short int pager)
257257
fprintf(output, _(" \\dO[S+] [PATTERN] list collations\n"));
258258
fprintf(output, _(" \\dp [PATTERN] list table, view, and sequence access privileges\n"));
259259
fprintf(output, _(" \\dP[itn+] [PATTERN] list [only index/table] partitioned relations [n=nested]\n"));
260-
fprintf(output, _(" \\drds [PATRN1 [PATRN2]] list per-database role settings\n"));
260+
fprintf(output, _(" \\drds [ROLEPTRN [DBPTRN]] list per-database role settings\n"));
261261
fprintf(output, _(" \\dRp[+] [PATTERN] list replication publications\n"));
262262
fprintf(output, _(" \\dRs[+] [PATTERN] list replication subscriptions\n"));
263263
fprintf(output, _(" \\ds[S+] [PATTERN] list sequences\n"));
@@ -347,7 +347,7 @@ helpVariables(unsigned short int pager)
347347
* Windows builds currently print one more line than non-Windows builds.
348348
* Using the larger number is fine.
349349
*/
350-
output = PageOutput(158, pager ? &(pset.popt.topt) : NULL);
350+
output = PageOutput(160, pager ? &(pset.popt.topt) : NULL);
351351

352352
fprintf(output, _("List of specially treated variables\n\n"));
353353

0 commit comments

Comments
 (0)