Skip to content

Commit 9ade78c

Browse files
committed
psql: Review of new help output strings
1 parent 3ef762e commit 9ade78c

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

src/bin/psql/describe.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,16 +2063,16 @@ describeOneTableDetails(const char *schemaname,
20632063
printTableAddFooter(&cont, _("Policies:"));
20642064

20652065
if (tableinfo.rowsecurity && tableinfo.forcerowsecurity && tuples > 0)
2066-
printTableAddFooter(&cont, _("Policies (Forced Row Security Enabled):"));
2066+
printTableAddFooter(&cont, _("Policies (forced row security enabled):"));
20672067

20682068
if (tableinfo.rowsecurity && !tableinfo.forcerowsecurity && tuples == 0)
2069-
printTableAddFooter(&cont, _("Policies (Row Security Enabled): (None)"));
2069+
printTableAddFooter(&cont, _("Policies (row security enabled): (none)"));
20702070

20712071
if (tableinfo.rowsecurity && tableinfo.forcerowsecurity && tuples == 0)
2072-
printTableAddFooter(&cont, _("Policies (Forced Row Security Enabled): (None)"));
2072+
printTableAddFooter(&cont, _("Policies (forced row security enabled): (none)"));
20732073

20742074
if (!tableinfo.rowsecurity && tuples > 0)
2075-
printTableAddFooter(&cont, _("Policies (Row Security Disabled):"));
2075+
printTableAddFooter(&cont, _("Policies (row security disabled):"));
20762076

20772077
/* Might be an empty set - that's ok */
20782078
for (i = 0; i < tuples; i++)

src/bin/psql/help.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ slashUsage(unsigned short int pager)
173173

174174
fprintf(output, _("Help\n"));
175175

176-
fprintf(output, _(" \\? [commands] description of all psql backslash commands\n"));
177-
fprintf(output, _(" \\? options description of all psql commandline options\n"));
178-
fprintf(output, _(" \\? variables description of all psql configuration variables\n"));
176+
fprintf(output, _(" \\? [commands] show help on backslash commands\n"));
177+
fprintf(output, _(" \\? options show help on psql command-line options\n"));
178+
fprintf(output, _(" \\? variables show help on special variables\n"));
179179
fprintf(output, _(" \\h [NAME] help on syntax of SQL commands, * for all commands\n"));
180180
fprintf(output, "\n");
181181

@@ -308,75 +308,75 @@ helpVariables(unsigned short int pager)
308308

309309
output = PageOutput(85, pager ? &(pset.popt.topt) : NULL);
310310

311-
fprintf(output, _("List of specially treated variables.\n"));
311+
fprintf(output, _("List of specially treated variables\n\n"));
312312

313313
fprintf(output, _("psql variables:\n"));
314314
fprintf(output, _("Usage:\n"));
315-
fprintf(output, _(" psql --set=NAME=VALUE\n or \\set NAME VALUE in interactive mode\n\n"));
315+
fprintf(output, _(" psql --set=NAME=VALUE\n or \\set NAME VALUE inside psql\n\n"));
316316

317317
fprintf(output, _(" AUTOCOMMIT if set, successful SQL commands are automatically committed\n"));
318-
fprintf(output, _(" COMP_KEYWORD_CASE determine the case used to complete SQL keywords\n"
318+
fprintf(output, _(" COMP_KEYWORD_CASE determines the case used to complete SQL key words\n"
319319
" [lower, upper, preserve-lower, preserve-upper]\n"));
320320
fprintf(output, _(" DBNAME the currently connected database name\n"));
321-
fprintf(output, _(" ECHO control what input is written to standard output\n"
321+
fprintf(output, _(" ECHO controls what input is written to standard output\n"
322322
" [all, errors, none, queries]\n"));
323-
fprintf(output, _(" ECHO_HIDDEN display internal queries executed by backslash commands when it is set\n"
324-
" or with [noexec] just show without execution\n"));
323+
fprintf(output, _(" ECHO_HIDDEN if set, display internal queries executed by backslash commands;\n"
324+
" if set to \"noexec\", just show without execution\n"));
325325
fprintf(output, _(" ENCODING current client character set encoding\n"));
326326
fprintf(output, _(" FETCH_COUNT the number of result rows to fetch and display at a time\n"
327327
" (default: 0=unlimited)\n"));
328-
fprintf(output, _(" HISTCONTROL control history list [ignorespace, ignoredups, ignoreboth]\n"));
329-
fprintf(output, _(" HISTFILE file name used to store the history list\n"));
328+
fprintf(output, _(" HISTCONTROL controls command history [ignorespace, ignoredups, ignoreboth]\n"));
329+
fprintf(output, _(" HISTFILE file name used to store the command history\n"));
330330
fprintf(output, _(" HISTSIZE the number of commands to store in the command history\n"));
331-
fprintf(output, _(" HOST the currently connected database server\n"));
331+
fprintf(output, _(" HOST the currently connected database server host\n"));
332332
fprintf(output, _(" IGNOREEOF if unset, sending an EOF to interactive session terminates application\n"));
333-
fprintf(output, _(" LASTOID the value of last affected OID\n"));
334-
fprintf(output, _(" ON_ERROR_ROLLBACK if set, an error doesn't stop a transaction (uses implicit SAVEPOINTs)\n"));
333+
fprintf(output, _(" LASTOID value of the last affected OID\n"));
334+
fprintf(output, _(" ON_ERROR_ROLLBACK if set, an error doesn't stop a transaction (uses implicit savepoints)\n"));
335335
fprintf(output, _(" ON_ERROR_STOP stop batch execution after error\n"));
336336
fprintf(output, _(" PORT server port of the current connection\n"));
337-
fprintf(output, _(" PROMPT1 specify the standard psql prompt\n"));
338-
fprintf(output, _(" PROMPT2 specify the prompt used when a statement continues from a previous line\n"));
339-
fprintf(output, _(" PROMPT3 specify the prompt used during COPY ... FROM STDIN\n"));
337+
fprintf(output, _(" PROMPT1 specifies the standard psql prompt\n"));
338+
fprintf(output, _(" PROMPT2 specifies the prompt used when a statement continues from a previous line\n"));
339+
fprintf(output, _(" PROMPT3 specifies the prompt used during COPY ... FROM STDIN\n"));
340340
fprintf(output, _(" QUIET run quietly (same as -q option)\n"));
341341
fprintf(output, _(" SINGLELINE end of line terminates SQL command mode (same as -S option)\n"));
342342
fprintf(output, _(" SINGLESTEP single-step mode (same as -s option)\n"));
343343
fprintf(output, _(" USER the currently connected database user\n"));
344-
fprintf(output, _(" VERBOSITY control verbosity of error reports [default, verbose, terse]\n"));
344+
fprintf(output, _(" VERBOSITY controls verbosity of error reports [default, verbose, terse]\n"));
345345

346-
fprintf(output, _("\nDisplay influencing variables:\n"));
346+
fprintf(output, _("\nDisplay settings:\n"));
347347
fprintf(output, _("Usage:\n"));
348-
fprintf(output, _(" psql --pset=NAME[=VALUE]\n or \\pset NAME [VALUE] in interactive mode\n\n"));
348+
fprintf(output, _(" psql --pset=NAME[=VALUE]\n or \\pset NAME [VALUE] inside psql\n\n"));
349349

350350
fprintf(output, _(" border border style (number)\n"));
351-
fprintf(output, _(" columns set the target width for the wrapped format\n"));
352-
fprintf(output, _(" expanded (or x) toggle expanded output\n"));
353-
fprintf(output, _(" fieldsep field separator for unaligned output (default '|')\n"));
354-
fprintf(output, _(" fieldsep_zero set field separator in unaligned mode to zero\n"));
351+
fprintf(output, _(" columns target width for the wrapped format\n"));
352+
fprintf(output, _(" expanded (or x) expanded output [on, off, auto]\n"));
353+
fprintf(output, _(" fieldsep field separator for unaligned output (default \"%s\")\n"), DEFAULT_FIELD_SEP);
354+
fprintf(output, _(" fieldsep_zero set field separator for unaligned output to zero byte\n"));
355355
fprintf(output, _(" format set output format [unaligned, aligned, wrapped, html, asciidoc, ...]\n"));
356356
fprintf(output, _(" footer enable or disable display of the table footer [on, off]\n"));
357357
fprintf(output, _(" linestyle set the border line drawing style [ascii, old-ascii, unicode]\n"));
358358
fprintf(output, _(" null set the string to be printed in place of a null value\n"));
359359
fprintf(output, _(" numericlocale enable or disable display of a locale-specific character to separate\n"
360360
" groups of digits [on, off]\n"));
361361
fprintf(output, _(" pager control when an external pager is used [yes, no, always]\n"));
362-
fprintf(output, _(" recordsep specify the record (line) separator to use in unaligned output format\n"));
363-
fprintf(output, _(" recordsep_zero set the record separator to use in unaligned output format to a zero byte.\n"));
362+
fprintf(output, _(" recordsep record (line) separator for unaligned output\n"));
363+
fprintf(output, _(" recordsep_zero set record separator for unaligned output to zero byte\n"));
364364
fprintf(output, _(" tableattr (or T) specify attributes for table tag in html format or proportional\n"
365-
" column width of left aligned data type in latex format\n"));
365+
" column widths for left-aligned data types in latex-longtable format\n"));
366366
fprintf(output, _(" title set the table title for any subsequently printed tables\n"));
367367
fprintf(output, _(" tuples_only if set, only actual table data is shown\n"));
368-
fprintf(output, _(" unicode_border_linestyle\n"));
369-
fprintf(output, _(" unicode_column_linestyle\n"));
370-
fprintf(output, _(" unicode_header_linestyle\n"
371-
" set the style of unicode line drawing [single, double]\n"));
368+
fprintf(output, _(" unicode_border_linestyle\n"
369+
" unicode_column_linestyle\n"
370+
" unicode_header_linestyle\n"
371+
" set the style of Unicode line drawing [single, double]\n"));
372372

373373
fprintf(output, _("\nEnvironment variables:\n"));
374374
fprintf(output, _("Usage:\n"));
375375

376376
#ifndef WIN32
377-
fprintf(output, _(" NAME=VALUE [NAME=VALUE] psql ...\n or \\setenv NAME [VALUE] in interactive mode\n\n"));
377+
fprintf(output, _(" NAME=VALUE [NAME=VALUE] psql ...\n or \\setenv NAME [VALUE] inside psql\n\n"));
378378
#else
379-
fprintf(output, _(" set NAME=VALUE\n psql ...\n or \\setenv NAME VALUE in interactive mode\n\n"));
379+
fprintf(output, _(" set NAME=VALUE\n psql ...\n or \\setenv NAME [VALUE] inside psql\n\n"));
380380
#endif
381381

382382
fprintf(output, _(" COLUMNS number of columns for wrapped format\n"));

0 commit comments

Comments
 (0)