* helpVariables * * show list of available variables (options) from command line */
| 342 | * show list of available variables (options) from command line |
| 343 | */ |
| 344 | void |
| 345 | helpVariables(unsigned short int pager) |
| 346 | { |
| 347 | FILE *output; |
| 348 | |
| 349 | /* |
| 350 | * Keep this line count in sync with the number of lines printed below! |
| 351 | * Use "psql --help=variables | wc" to count correctly; but notice that |
| 352 | * Windows builds currently print one more line than non-Windows builds. |
| 353 | * Using the larger number is fine. |
| 354 | */ |
| 355 | output = PageOutput(160, pager ? &(pset.popt.topt) : NULL); |
| 356 | |
| 357 | fprintf(output, _("List of specially treated variables\n\n")); |
| 358 | |
| 359 | fprintf(output, _("psql variables:\n")); |
| 360 | fprintf(output, _("Usage:\n")); |
| 361 | fprintf(output, _(" psql --set=NAME=VALUE\n or \\set NAME VALUE inside psql\n\n")); |
| 362 | |
| 363 | fprintf(output, _(" AUTOCOMMIT\n" |
| 364 | " if set, successful SQL commands are automatically committed\n")); |
| 365 | fprintf(output, _(" COMP_KEYWORD_CASE\n" |
| 366 | " determines the case used to complete SQL key words\n" |
| 367 | " [lower, upper, preserve-lower, preserve-upper]\n")); |
| 368 | fprintf(output, _(" DBNAME\n" |
| 369 | " the currently connected database name\n")); |
| 370 | fprintf(output, _(" ECHO\n" |
| 371 | " controls what input is written to standard output\n" |
| 372 | " [all, errors, none, queries]\n")); |
| 373 | fprintf(output, _(" ECHO_HIDDEN\n" |
| 374 | " if set, display internal queries executed by backslash commands;\n" |
| 375 | " if set to \"noexec\", just show them without execution\n")); |
| 376 | fprintf(output, _(" ENCODING\n" |
| 377 | " current client character set encoding\n")); |
| 378 | fprintf(output, _(" ERROR\n" |
| 379 | " true if last query failed, else false\n")); |
| 380 | fprintf(output, _(" FETCH_COUNT\n" |
| 381 | " the number of result rows to fetch and display at a time (0 = unlimited)\n")); |
| 382 | fprintf(output, _(" HIDE_TABLEAM\n" |
| 383 | " if set, table access methods are not displayed\n")); |
| 384 | fprintf(output, _(" HIDE_TOAST_COMPRESSION\n" |
| 385 | " if set, compression methods are not displayed\n")); |
| 386 | fprintf(output, _(" HISTCONTROL\n" |
| 387 | " controls command history [ignorespace, ignoredups, ignoreboth]\n")); |
| 388 | fprintf(output, _(" HISTFILE\n" |
| 389 | " file name used to store the command history\n")); |
| 390 | fprintf(output, _(" HISTSIZE\n" |
| 391 | " maximum number of commands to store in the command history\n")); |
| 392 | fprintf(output, _(" HOST\n" |
| 393 | " the currently connected database server host\n")); |
| 394 | fprintf(output, _(" IGNOREEOF\n" |
| 395 | " number of EOFs needed to terminate an interactive session\n")); |
| 396 | fprintf(output, _(" LASTOID\n" |
| 397 | " value of the last affected OID\n")); |
| 398 | fprintf(output, _(" LAST_ERROR_MESSAGE\n" |
| 399 | " LAST_ERROR_SQLSTATE\n" |
| 400 | " message and SQLSTATE of last error, or empty string and \"00000\" if none\n")); |
| 401 | fprintf(output, _(" ON_ERROR_ROLLBACK\n" |
no test coverage detected