1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Improve formatting of --help output.

This commit is contained in:
Peter Eisentraut
2002-10-18 22:05:36 +00:00
parent 0d17ce92ac
commit 4cff161703
23 changed files with 324 additions and 271 deletions

View File

@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.303 2002/10/16 05:46:54 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.304 2002/10/18 22:05:35 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -656,9 +656,28 @@ help(const char *progname)
{
printf(_("%s dumps a database as a text file or to other formats.\n\n"), progname);
printf(_("Usage:\n"));
printf(_(" %s [OPTIONS] DBNAME\n\n"), progname);
printf(_("Options:\n"));
printf(_(" %s [OPTION]... [DBNAME]\n"), progname);
printf(_("\nGeneral options:\n"));
#ifdef HAVE_GETOPT_LONG
printf(_(" -f, --file=FILENAME output file name\n"));
printf(_(" -F, --format=c|t|p output file format (custom, tar, plain text)\n"));
printf(_(" -i, --ignore-version proceed even when server version mismatches\n"
" pg_dump version\n"));
printf(_(" -v, --verbose verbose mode\n"));
printf(_(" -Z, --compress=0-9 compression level for compressed formats\n"));
#else /* not HAVE_GETOPT_LONG */
printf(_(" -f FILENAME output file name\n"));
printf(_(" -F c|t|p output file format (custom, tar, plain text)\n"));
printf(_(" -i proceed even when server version mismatches\n"
" pg_dump version\n"));
printf(_(" -v verbose mode\n"));
printf(_(" -Z 0-9 compression level for compressed formats\n"));
#endif /* not HAVE_GETOPT_LONG */
printf(_(" --help show this help, then exit\n"));
printf(_(" --version output version information, then exit\n"));
printf(_("\nOptions controlling the output content:\n"));
#ifdef HAVE_GETOPT_LONG
printf(_(" -a, --data-only dump only the data, not the schema\n"));
printf(_(" -b, --blobs include large objects in dump\n"));
@@ -666,64 +685,56 @@ help(const char *progname)
printf(_(" -C, --create include commands to create database in dump\n"));
printf(_(" -d, --inserts dump data as INSERT, rather than COPY, commands\n"));
printf(_(" -D, --column-inserts dump data as INSERT commands with column names\n"));
printf(_(" -f, --file=FILENAME output file name\n"));
printf(_(" -F, --format {c|t|p} output file format (custom, tar, plain text)\n"));
printf(_(" -h, --host=HOSTNAME database server host name\n"));
printf(_(" -i, --ignore-version proceed even when server version mismatches\n"
" pg_dump version\n"));
printf(_(" -o, --oids include OIDs in dump\n"));
printf(_(" -O, --no-owner do not output \\connect commands in plain\n"
" text format\n"));
printf(_(" -p, --port=PORT database server port number\n"));
printf(_(" -R, --no-reconnect disable ALL reconnections to the database in\n"
" plain text format\n"));
printf(_(" -s, --schema-only dump only the schema, no data\n"));
printf(_(" -S, --superuser=NAME specify the superuser user name to use in\n"
" plain text format\n"));
printf(_(" -t, --table=TABLE dump this table only (* for all)\n"));
printf(_(" -U, --username=NAME connect as specified database user\n"));
printf(_(" -v, --verbose verbose mode\n"));
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n"));
printf(_(" -X use-set-session-authorization, --use-set-session-authorization\n"
" output SET SESSION AUTHORIZATION commands rather\n"
" than \\connect commands\n"));
printf(_(" -X disable-triggers, --disable-triggers\n"
" disable triggers during data-only restore\n"));
printf(_(" -Z, --compress {0-9} compression level for compressed formats\n"));
#else /* not HAVE_GETOPT_LONG */
#else /* not HAVE_GETOPT_LONG */
printf(_(" -a dump only the data, not the schema\n"));
printf(_(" -b include large objects in dump\n"));
printf(_(" -c clean (drop) schema prior to create\n"));
printf(_(" -C include commands to create database in dump\n"));
printf(_(" -d dump data as INSERT, rather than COPY, commands\n"));
printf(_(" -D dump data as INSERT commands with column names\n"));
printf(_(" -f FILENAME output file name\n"));
printf(_(" -F {c|t|p} output file format (custom, tar, plain text)\n"));
printf(_(" -h HOSTNAME database server host name\n"));
printf(_(" -i proceed even when server version mismatches\n"
" pg_dump version\n"));
printf(_(" -o include OIDs in dump\n"));
printf(_(" -O do not output \\connect commands in plain\n"
" text format\n"));
printf(_(" -p PORT database server port number\n"));
printf(_(" -R disable ALL reconnections to the database in\n"
" plain text format\n"));
printf(_(" -s dump only the schema, no data\n"));
printf(_(" -S NAME specify the superuser user name to use in\n"
" plain text format\n"));
printf(_(" -t TABLE dump this table only (* for all)\n"));
printf(_(" -U NAME connect as specified database user\n"));
printf(_(" -v verbose mode\n"));
printf(_(" -W force password prompt (should happen automatically)\n"));
printf(_(" -x do not dump privileges (grant/revoke)\n"));
printf(_(" -X use-set-session-authorization\n"
" output SET SESSION AUTHORIZATION commands rather\n"
" than \\connect commands\n"));
printf(_(" -X disable-triggers disable triggers during data-only restore\n"));
printf(_(" -Z {0-9} compression level for compressed formats\n"));
#endif
#endif /* not HAVE_GETOPT_LONG */
printf(_("\nConnection options:\n"));
#ifdef HAVE_GETOPT_LONG
printf(_(" -h, --host=HOSTNAME database server host name\n"));
printf(_(" -p, --port=PORT database server port number\n"));
printf(_(" -U, --username=NAME connect as specified database user\n"));
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
#else /* not HAVE_GETOPT_LONG */
printf(_(" -h HOSTNAME database server host name\n"));
printf(_(" -p PORT database server port number\n"));
printf(_(" -U NAME connect as specified database user\n"));
printf(_(" -W force password prompt (should happen automatically)\n"));
#endif /* not HAVE_GETOPT_LONG */
printf(_("\nIf no database name is not supplied, then the PGDATABASE environment\n"
"variable value is used.\n\n"));