Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cd3b750

Browse files
committed
Sort the output of --help mostly alphabetical, make it align better, make
help of pg_dump and pg_dumpall more similar.
1 parent 0160ceb commit cd3b750

File tree

17 files changed

+115
-114
lines changed

17 files changed

+115
-114
lines changed

src/bin/initdb/initdb.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.167 2009/01/22 20:16:07 tgl Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.168 2009/02/25 13:03:06 petere Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -2420,29 +2420,29 @@ usage(const char *progname)
24202420
printf(_("Usage:\n"));
24212421
printf(_(" %s [OPTION]... [DATADIR]\n"), progname);
24222422
printf(_("\nOptions:\n"));
2423+
printf(_(" -A, --auth=METHOD default authentication method for local connections\n"));
24232424
printf(_(" [-D, --pgdata=]DATADIR location for this database cluster\n"));
24242425
printf(_(" -E, --encoding=ENCODING set default encoding for new databases\n"));
2425-
printf(_(" --locale=LOCALE set default locale for new databases\n"));
2426-
printf(_(" --lc-collate, --lc-ctype, --lc-messages=LOCALE\n"
2427-
" --lc-monetary, --lc-numeric, --lc-time=LOCALE\n"
2428-
" set default locale in the respective\n"
2429-
" category for new databases (default\n"
2430-
" taken from environment)\n"));
2431-
printf(_(" --no-locale equivalent to --locale=C\n"));
2426+
printf(_(" --locale=LOCALE set default locale for new databases\n"));
2427+
printf(_(" --lc-collate=, --lc-ctype=, --lc-messages=LOCALE\n"
2428+
" --lc-monetary=, --lc-numeric=, --lc-time=LOCALE\n"
2429+
" set default locale in the respective category for\n"
2430+
" new databases (default taken from environment)\n"));
2431+
printf(_(" --no-locale equivalent to --locale=C\n"));
2432+
printf(_(" --pwfile=FILE read password for the new superuser from file\n"));
24322433
printf(_(" -T, --text-search-config=CFG\n"
24332434
" default text search configuration\n"));
2434-
printf(_(" -X, --xlogdir=XLOGDIR location for the transaction log directory\n"));
2435-
printf(_(" -A, --auth=METHOD default authentication method for local connections\n"));
24362435
printf(_(" -U, --username=NAME database superuser name\n"));
24372436
printf(_(" -W, --pwprompt prompt for a password for the new superuser\n"));
2438-
printf(_(" --pwfile=FILE read password for the new superuser from file\n"));
2439-
printf(_(" -?, --help show this help, then exit\n"));
2440-
printf(_(" -V, --version output version information, then exit\n"));
2437+
printf(_(" -X, --xlogdir=XLOGDIR location for the transaction log directory\n"));
24412438
printf(_("\nLess commonly used options:\n"));
24422439
printf(_(" -d, --debug generate lots of debugging output\n"));
2443-
printf(_(" -s, --show show internal settings\n"));
24442440
printf(_(" -L DIRECTORY where to find the input files\n"));
24452441
printf(_(" -n, --noclean do not clean up after errors\n"));
2442+
printf(_(" -s, --show show internal settings\n"));
2443+
printf(_("\nOther options:\n"));
2444+
printf(_(" -?, --help show this help, then exit\n"));
2445+
printf(_(" -V, --version output version information, then exit\n"));
24462446
printf(_("\nIf the data directory is not specified, the environment variable PGDATA\n"
24472447
"is used.\n"));
24482448
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));

src/bin/pg_ctl/pg_ctl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.108 2009/01/28 11:19:37 mha Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.109 2009/02/25 13:03:06 petere Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -1546,15 +1546,15 @@ do_help(void)
15461546
printf(_("If the -D option is omitted, the environment variable PGDATA is used.\n"));
15471547

15481548
printf(_("\nOptions for start or restart:\n"));
1549-
printf(_(" -l, --log FILENAME write (or append) server log to FILENAME\n"));
1550-
printf(_(" -o OPTIONS command line options to pass to postgres\n"
1551-
" (PostgreSQL server executable)\n"));
1552-
printf(_(" -p PATH-TO-POSTGRES normally not necessary\n"));
15531549
#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
15541550
printf(_(" -c, --core-files allow postgres to produce core files\n"));
15551551
#else
15561552
printf(_(" -c, --core-files not applicable on this platform\n"));
15571553
#endif
1554+
printf(_(" -l, --log FILENAME write (or append) server log to FILENAME\n"));
1555+
printf(_(" -o OPTIONS command line options to pass to postgres\n"
1556+
" (PostgreSQL server executable)\n"));
1557+
printf(_(" -p PATH-TO-POSTGRES normally not necessary\n"));
15581558
printf(_("\nOptions for stop or restart:\n"));
15591559
printf(_(" -m SHUTDOWN-MODE can be \"smart\", \"fast\", or \"immediate\"\n"));
15601560

src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.525 2009/02/24 10:06:33 petere Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.526 2009/02/25 13:03:06 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -816,11 +816,10 @@ help(const char *progname)
816816
printf(_(" -n, --schema=SCHEMA dump the named schema(s) only\n"));
817817
printf(_(" -N, --exclude-schema=SCHEMA do NOT dump the named schema(s)\n"));
818818
printf(_(" -o, --oids include OIDs in dump\n"));
819-
printf(_(" -O, --no-owner skip restoration of object ownership\n"
820-
" in plain text format\n"));
819+
printf(_(" -O, --no-owner skip restoration of object ownership in\n"
820+
" plain-text format\n"));
821821
printf(_(" -s, --schema-only dump only the schema, no data\n"));
822-
printf(_(" -S, --superuser=NAME specify the superuser user name to use in\n"
823-
" plain text format\n"));
822+
printf(_(" -S, --superuser=NAME superuser user name to use in plain-text format\n"));
824823
printf(_(" -t, --table=TABLE dump the named table(s) only\n"));
825824
printf(_(" -T, --exclude-table=TABLE do NOT dump the named table(s)\n"));
826825
printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n"));
@@ -829,8 +828,8 @@ help(const char *progname)
829828
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
830829
printf(_(" --role=ROLENAME do SET ROLE before dump\n"));
831830
printf(_(" --use-set-session-authorization\n"
832-
" use SESSION AUTHORIZATION commands instead of\n"
833-
" ALTER OWNER commands to set ownership\n"));
831+
" use SET SESSION AUTHORIZATION commands instead of\n"
832+
" ALTER OWNER commands to set ownership\n"));
834833

835834
printf(_("\nConnection options:\n"));
836835
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));

src/bin/pg_dump/pg_dumpall.c

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.115 2009/02/18 12:07:08 momjian Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.116 2009/02/25 13:03:06 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -498,41 +498,40 @@ help(void)
498498
printf(_(" %s [OPTION]...\n"), progname);
499499

500500
printf(_("\nGeneral options:\n"));
501-
printf(_(" -f, --file=FILENAME output file name\n"));
502-
printf(_(" --help show this help, then exit\n"));
503-
printf(_(" --version output version information, then exit\n"));
504-
printf(_(" --lock-wait-timeout=TIMEOUT\n"
505-
" fail after waiting TIMEOUT for a table lock\n"));
501+
printf(_(" -f, --file=FILENAME output file name\n"));
502+
printf(_(" --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock\n"));
503+
printf(_(" --help show this help, then exit\n"));
504+
printf(_(" --version output version information, then exit\n"));
506505
printf(_("\nOptions controlling the output content:\n"));
507-
printf(_(" -a, --data-only dump only the data, not the schema\n"));
508-
printf(_(" -c, --clean clean (drop) databases before recreating\n"));
509-
printf(_(" -d, --inserts dump data as INSERT, rather than COPY, commands\n"));
510-
printf(_(" -D, --column-inserts dump data as INSERT commands with column names\n"));
511-
printf(_(" -g, --globals-only dump only global objects, no databases\n"));
512-
printf(_(" -o, --oids include OIDs in dump\n"));
513-
printf(_(" -O, --no-owner skip restoration of object ownership\n"));
514-
printf(_(" -r, --roles-only dump only roles, no databases or tablespaces\n"));
515-
printf(_(" -s, --schema-only dump only the schema, no data\n"));
516-
printf(_(" -S, --superuser=NAME specify the superuser user name to use in the dump\n"));
517-
printf(_(" -t, --tablespaces-only dump only tablespaces, no databases or roles\n"));
518-
printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n"));
519-
printf(_(" --disable-dollar-quoting\n"
520-
" disable dollar quoting, use SQL standard quoting\n"));
521-
printf(_(" --disable-triggers disable triggers during data-only restore\n"));
522-
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
523-
printf(_(" --role=ROLENAME do SET ROLE before dump\n"));
506+
printf(_(" -a, --data-only dump only the data, not the schema\n"));
507+
printf(_(" -c, --clean clean (drop) databases before recreating\n"));
508+
printf(_(" -d, --inserts dump data as INSERT commands, rather than COPY\n"));
509+
printf(_(" -D, --column-inserts dump data as INSERT commands with column names\n"));
510+
printf(_(" -g, --globals-only dump only global objects, no databases\n"));
511+
printf(_(" -o, --oids include OIDs in dump\n"));
512+
printf(_(" -O, --no-owner skip restoration of object ownership\n"));
513+
printf(_(" -r, --roles-only dump only roles, no databases or tablespaces\n"));
514+
printf(_(" -s, --schema-only dump only the schema, no data\n"));
515+
printf(_(" -S, --superuser=NAME superuser user name to use in the dump\n"));
516+
printf(_(" -t, --tablespaces-only dump only tablespaces, no databases or roles\n"));
517+
printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n"));
518+
printf(_(" --disable-dollar-quoting disable dollar quoting, use SQL standard quoting\n"));
519+
printf(_(" --disable-triggers disable triggers during data-only restore\n"));
520+
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
521+
printf(_(" --role=ROLENAME do SET ROLE before dump\n"));
524522
printf(_(" --use-set-session-authorization\n"
525-
" use SESSION AUTHORIZATION commands instead of\n"
526-
" OWNER TO commands\n"));
523+
" use SET SESSION AUTHORIZATION commands instead of\n"
524+
" ALTER OWNER commands to set ownership\n"));
527525

528526
printf(_("\nConnection options:\n"));
529527
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
530-
printf(_(" -l, --database=DBNAME specify an alternative default database\n"));
528+
printf(_(" -l, --database=DBNAME alternative default database\n"));
531529
printf(_(" -p, --port=PORT database server port number\n"));
532530
printf(_(" -U, --username=NAME connect as specified database user\n"));
533531
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
534532

535-
printf(_("\nThe SQL script will be written to the standard output.\n\n"));
533+
printf(_("\nIf -f/--file is not used, then the SQL script will be written to the standard\n"
534+
"output.\n\n"));
536535
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
537536
}
538537

src/bin/pg_dump/pg_restore.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
*
3636
* IDENTIFICATION
37-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.92 2009/02/02 20:07:37 adunstan Exp $
37+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.93 2009/02/25 13:03:06 petere Exp $
3838
*
3939
*-------------------------------------------------------------------------
4040
*/
@@ -397,7 +397,7 @@ usage(const char *progname)
397397
printf(_("\nGeneral options:\n"));
398398
printf(_(" -d, --dbname=NAME connect to database name\n"));
399399
printf(_(" -f, --file=FILENAME output file name\n"));
400-
printf(_(" -F, --format=c|t specify backup file format\n"));
400+
printf(_(" -F, --format=c|t backup file format (should be automatic)\n"));
401401
printf(_(" -l, --list print summarized TOC of the archive\n"));
402402
printf(_(" -v, --verbose verbose mode\n"));
403403
printf(_(" --help show this help, then exit\n"));
@@ -407,17 +407,17 @@ usage(const char *progname)
407407
printf(_(" -a, --data-only restore only the data, no schema\n"));
408408
printf(_(" -c, --clean clean (drop) database objects before recreating\n"));
409409
printf(_(" -C, --create create the target database\n"));
410+
printf(_(" -e, --exit-on-error exit on error, default is to continue\n"));
410411
printf(_(" -I, --index=NAME restore named index\n"));
411-
printf(_(" -L, --use-list=FILENAME use specified table of contents for ordering\n"
412-
" output from this file\n"));
412+
printf(_(" -L, --use-list=FILENAME use table of contents from this file for\n"
413+
" selecting/ordering output\n"));
413414
printf(_(" -m, --multi-thread=NUM use this many parallel connections to restore\n"));
414415
printf(_(" -n, --schema=NAME restore only objects in this schema\n"));
415416
printf(_(" -O, --no-owner skip restoration of object ownership\n"));
416417
printf(_(" -P, --function=NAME(args)\n"
417418
" restore named function\n"));
418419
printf(_(" -s, --schema-only restore only the schema, no data\n"));
419-
printf(_(" -S, --superuser=NAME specify the superuser user name to use for\n"
420-
" disabling triggers\n"));
420+
printf(_(" -S, --superuser=NAME superuser user name to use for disabling triggers\n"));
421421
printf(_(" -t, --table=NAME restore named table\n"));
422422
printf(_(" -T, --trigger=NAME restore named trigger\n"));
423423
printf(_(" -x, --no-privileges skip restoration of access privileges (grant/revoke)\n"));
@@ -428,8 +428,8 @@ usage(const char *progname)
428428
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
429429
printf(_(" --role=ROLENAME do SET ROLE before restore\n"));
430430
printf(_(" --use-set-session-authorization\n"
431-
" use SESSION AUTHORIZATION commands instead of\n"
432-
" OWNER TO commands\n"));
431+
" use SET SESSION AUTHORIZATION commands instead of\n"
432+
" ALTER OWNER commands to set ownership\n"));
433433
printf(_(" -1, --single-transaction\n"
434434
" restore as a single transaction\n"));
435435

@@ -438,7 +438,6 @@ usage(const char *progname)
438438
printf(_(" -p, --port=PORT database server port number\n"));
439439
printf(_(" -U, --username=NAME connect as specified database user\n"));
440440
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
441-
printf(_(" -e, --exit-on-error exit on error, default is to continue\n"));
442441

443442
printf(_("\nIf no input file name is supplied, then standard input is used.\n\n"));
444443
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));

src/bin/pg_resetxlog/pg_resetxlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
2424
* Portions Copyright (c) 1994, Regents of the University of California
2525
*
26-
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.71 2009/01/01 17:23:54 momjian Exp $
26+
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.72 2009/02/25 13:03:07 petere Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -921,14 +921,14 @@ usage(void)
921921
printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname);
922922
printf(_("Usage:\n %s [OPTION]... DATADIR\n\n"), progname);
923923
printf(_("Options:\n"));
924+
printf(_(" -e XIDEPOCH set next transaction ID epoch\n"));
924925
printf(_(" -f force update to be done\n"));
925926
printf(_(" -l TLI,FILE,SEG force minimum WAL starting location for new transaction log\n"));
926927
printf(_(" -m XID set next multitransaction ID\n"));
927928
printf(_(" -n no update, just show extracted control values (for testing)\n"));
928929
printf(_(" -o OID set next OID\n"));
929930
printf(_(" -O OFFSET set next multitransaction offset\n"));
930931
printf(_(" -x XID set next transaction ID\n"));
931-
printf(_(" -e XIDEPOCH set next transaction ID epoch\n"));
932932
printf(_(" --help show this help, then exit\n"));
933933
printf(_(" --version output version information, then exit\n"));
934934
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));

0 commit comments

Comments
 (0)