|
22 | 22 | *
|
23 | 23 | *
|
24 | 24 | * IDENTIFICATION
|
25 |
| - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.303 2002/10/1605:46:54 momjian Exp $ |
| 25 | + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.304 2002/10/18 22:05:35 petere Exp $ |
26 | 26 | *
|
27 | 27 | *-------------------------------------------------------------------------
|
28 | 28 | */
|
@@ -656,74 +656,85 @@ help(const char *progname)
|
656 | 656 | {
|
657 | 657 | printf(_("%s dumps a database as a text file or to other formats.\n\n"),progname);
|
658 | 658 | printf(_("Usage:\n"));
|
659 |
| -printf(_(" %s [OPTIONS] DBNAME\n\n"),progname); |
660 |
| -printf(_("Options:\n")); |
| 659 | +printf(_(" %s [OPTION]... [DBNAME]\n"),progname); |
661 | 660 |
|
| 661 | +printf(_("\nGeneral options:\n")); |
| 662 | +#ifdefHAVE_GETOPT_LONG |
| 663 | +printf(_(" -f, --file=FILENAME output file name\n")); |
| 664 | +printf(_(" -F, --format=c|t|p output file format (custom, tar, plain text)\n")); |
| 665 | +printf(_(" -i, --ignore-version proceed even when server version mismatches\n" |
| 666 | +" pg_dump version\n")); |
| 667 | +printf(_(" -v, --verbose verbose mode\n")); |
| 668 | +printf(_(" -Z, --compress=0-9 compression level for compressed formats\n")); |
| 669 | +#else/* not HAVE_GETOPT_LONG */ |
| 670 | +printf(_(" -f FILENAME output file name\n")); |
| 671 | +printf(_(" -F c|t|p output file format (custom, tar, plain text)\n")); |
| 672 | +printf(_(" -i proceed even when server version mismatches\n" |
| 673 | +" pg_dump version\n")); |
| 674 | +printf(_(" -v verbose mode\n")); |
| 675 | +printf(_(" -Z 0-9 compression level for compressed formats\n")); |
| 676 | +#endif/* not HAVE_GETOPT_LONG */ |
| 677 | +printf(_(" --help show this help, then exit\n")); |
| 678 | +printf(_(" --version output version information, then exit\n")); |
| 679 | + |
| 680 | +printf(_("\nOptions controlling the output content:\n")); |
662 | 681 | #ifdefHAVE_GETOPT_LONG
|
663 | 682 | printf(_(" -a, --data-only dump only the data, not the schema\n"));
|
664 | 683 | printf(_(" -b, --blobs include large objects in dump\n"));
|
665 | 684 | printf(_(" -c, --clean clean (drop) schema prior to create\n"));
|
666 | 685 | printf(_(" -C, --create include commands to create database in dump\n"));
|
667 | 686 | printf(_(" -d, --inserts dump data as INSERT, rather than COPY, commands\n"));
|
668 | 687 | printf(_(" -D, --column-inserts dump data as INSERT commands with column names\n"));
|
669 |
| -printf(_(" -f, --file=FILENAME output file name\n")); |
670 |
| -printf(_(" -F, --format {c|t|p} output file format (custom, tar, plain text)\n")); |
671 |
| -printf(_(" -h, --host=HOSTNAME database server host name\n")); |
672 |
| -printf(_(" -i, --ignore-version proceed even when server version mismatches\n" |
673 |
| -" pg_dump version\n")); |
674 | 688 | printf(_(" -o, --oids include OIDs in dump\n"));
|
675 | 689 | printf(_(" -O, --no-owner do not output \\connect commands in plain\n"
|
676 | 690 | " text format\n"));
|
677 |
| -printf(_(" -p, --port=PORT database server port number\n")); |
678 | 691 | printf(_(" -R, --no-reconnect disable ALL reconnections to the database in\n"
|
679 | 692 | " plain text format\n"));
|
680 | 693 | printf(_(" -s, --schema-only dump only the schema, no data\n"));
|
681 | 694 | printf(_(" -S, --superuser=NAME specify the superuser user name to use in\n"
|
682 | 695 | " plain text format\n"));
|
683 | 696 | printf(_(" -t, --table=TABLE dump this table only (* for all)\n"));
|
684 |
| -printf(_(" -U, --username=NAME connect as specified database user\n")); |
685 |
| -printf(_(" -v, --verbose verbose mode\n")); |
686 |
| -printf(_(" -W, --password force password prompt (should happen automatically)\n")); |
687 | 697 | printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n"));
|
688 | 698 | printf(_(" -X use-set-session-authorization, --use-set-session-authorization\n"
|
689 | 699 | " output SET SESSION AUTHORIZATION commands rather\n"
|
690 | 700 | " than \\connect commands\n"));
|
691 | 701 | printf(_(" -X disable-triggers, --disable-triggers\n"
|
692 | 702 | " disable triggers during data-only restore\n"));
|
693 |
| -printf(_(" -Z, --compress {0-9} compression level for compressed formats\n")); |
694 |
| - |
695 |
| -#else/* not HAVE_GETOPT_LONG */ |
| 703 | +#else/* not HAVE_GETOPT_LONG */ |
696 | 704 | printf(_(" -a dump only the data, not the schema\n"));
|
697 | 705 | printf(_(" -b include large objects in dump\n"));
|
698 | 706 | printf(_(" -c clean (drop) schema prior to create\n"));
|
699 | 707 | printf(_(" -C include commands to create database in dump\n"));
|
700 | 708 | printf(_(" -d dump data as INSERT, rather than COPY, commands\n"));
|
701 | 709 | printf(_(" -D dump data as INSERT commands with column names\n"));
|
702 |
| -printf(_(" -f FILENAME output file name\n")); |
703 |
| -printf(_(" -F {c|t|p} output file format (custom, tar, plain text)\n")); |
704 |
| -printf(_(" -h HOSTNAME database server host name\n")); |
705 |
| -printf(_(" -i proceed even when server version mismatches\n" |
706 |
| -" pg_dump version\n")); |
707 | 710 | printf(_(" -o include OIDs in dump\n"));
|
708 | 711 | printf(_(" -O do not output \\connect commands in plain\n"
|
709 | 712 | " text format\n"));
|
710 |
| -printf(_(" -p PORT database server port number\n")); |
711 | 713 | printf(_(" -R disable ALL reconnections to the database in\n"
|
712 | 714 | " plain text format\n"));
|
713 | 715 | printf(_(" -s dump only the schema, no data\n"));
|
714 | 716 | printf(_(" -S NAME specify the superuser user name to use in\n"
|
715 | 717 | " plain text format\n"));
|
716 | 718 | printf(_(" -t TABLE dump this table only (* for all)\n"));
|
717 |
| -printf(_(" -U NAME connect as specified database user\n")); |
718 |
| -printf(_(" -v verbose mode\n")); |
719 |
| -printf(_(" -W force password prompt (should happen automatically)\n")); |
720 | 719 | printf(_(" -x do not dump privileges (grant/revoke)\n"));
|
721 | 720 | printf(_(" -X use-set-session-authorization\n"
|
722 | 721 | " output SET SESSION AUTHORIZATION commands rather\n"
|
723 | 722 | " than \\connect commands\n"));
|
724 | 723 | printf(_(" -X disable-triggers disable triggers during data-only restore\n"));
|
725 |
| -printf(_(" -Z {0-9} compression level for compressed formats\n")); |
726 |
| -#endif |
| 724 | +#endif/* not HAVE_GETOPT_LONG */ |
| 725 | + |
| 726 | +printf(_("\nConnection options:\n")); |
| 727 | +#ifdefHAVE_GETOPT_LONG |
| 728 | +printf(_(" -h, --host=HOSTNAME database server host name\n")); |
| 729 | +printf(_(" -p, --port=PORT database server port number\n")); |
| 730 | +printf(_(" -U, --username=NAME connect as specified database user\n")); |
| 731 | +printf(_(" -W, --password force password prompt (should happen automatically)\n")); |
| 732 | +#else/* not HAVE_GETOPT_LONG */ |
| 733 | +printf(_(" -h HOSTNAME database server host name\n")); |
| 734 | +printf(_(" -p PORT database server port number\n")); |
| 735 | +printf(_(" -U NAME connect as specified database user\n")); |
| 736 | +printf(_(" -W force password prompt (should happen automatically)\n")); |
| 737 | +#endif/* not HAVE_GETOPT_LONG */ |
727 | 738 |
|
728 | 739 | printf(_("\nIf no database name is not supplied, then the PGDATABASE environment\n"
|
729 | 740 | "variable value is used.\n\n"));
|
|