From 4cff161703beb10aab08b614feb9dfffc3860352 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter_e@gmx.net> Date: Fri, 18 Oct 2002 22:05:36 +0000 Subject: [PATCH] Improve formatting of --help output. --- src/backend/postmaster/postmaster.c | 6 ++- src/backend/tcop/postgres.c | 16 +++--- src/bin/initdb/initdb.sh | 38 +++++++------ src/bin/initlocation/initlocation.sh | 5 +- src/bin/ipcclean/ipcclean.sh | 5 +- src/bin/pg_config/pg_config.sh | 10 ++-- src/bin/pg_controldata/pg_controldata.c | 4 +- src/bin/pg_ctl/pg_ctl.sh | 31 +++++------ src/bin/pg_dump/pg_dump.c | 63 +++++++++++++--------- src/bin/pg_dump/pg_dumpall.c | 29 ++++++---- src/bin/pg_dump/pg_restore.c | 67 +++++++++++++---------- src/bin/pg_resetxlog/pg_resetxlog.c | 16 +++--- src/bin/psql/help.c | 72 ++++++++++++------------- src/bin/psql/startup.c | 7 +-- src/bin/scripts/clusterdb | 29 +++++----- src/bin/scripts/createdb | 27 +++++----- src/bin/scripts/createlang.sh | 19 +++---- src/bin/scripts/createuser | 37 +++++++------ src/bin/scripts/dropdb | 19 +++---- src/bin/scripts/droplang | 17 +++--- src/bin/scripts/dropuser | 19 +++---- src/bin/scripts/vacuumdb | 31 ++++++----- src/interfaces/ecpg/preproc/ecpg.c | 30 +++++------ 23 files changed, 325 insertions(+), 272 deletions(-) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 5f02759c5d8..933eac8c579 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.289 2002/09/26 05:17:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.290 2002/10/18 22:05:35 petere Exp $ * * NOTES * @@ -846,7 +846,7 @@ static void usage(const char *progname) { printf(gettext("%s is the PostgreSQL server.\n\n"), progname); - printf(gettext("Usage:\n %s [options...]\n\n"), progname); + printf(gettext("Usage:\n %s [OPTION]...\n\n"), progname); printf(gettext("Options:\n")); #ifdef USE_ASSERT_CHECKING printf(gettext(" -A 1|0 enable/disable run-time assert checking\n")); @@ -867,6 +867,8 @@ usage(const char *progname) printf(gettext(" -o OPTIONS pass 'OPTIONS' to each backend server\n")); printf(gettext(" -p PORT port number to listen on (default %d)\n"), DEF_PGPORT); printf(gettext(" -S silent mode (start in background without logging output)\n")); + printf(gettext(" --help show this help, then exit\n")); + printf(gettext(" --version output version information, then exit\n")); printf(gettext("\nDeveloper options:\n")); printf(gettext(" -n do not reinitialize shared memory after abnormal exit\n")); diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index ea1b0cb3714..38e3211ae72 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.303 2002/10/14 23:49:20 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.304 2002/10/18 22:05:35 petere Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1156,14 +1156,14 @@ usage(char *progname) { printf("%s is the PostgreSQL stand-alone backend. It is not\nintended to be used by normal users.\n\n", progname); - printf("Usage:\n %s [options...] [dbname]\n\n", progname); + printf("Usage:\n %s [OPTION]... [DBNAME]\n\n", progname); printf("Options:\n"); #ifdef USE_ASSERT_CHECKING printf(" -A 1|0 enable/disable run-time assert checking\n"); #endif printf(" -B NBUFFERS number of shared buffers (default %d)\n", DEF_NBUFFERS); printf(" -c NAME=VALUE set run-time parameter\n"); - printf(" -d 1-5,0 debugging level (0 is off)\n"); + printf(" -d 0-5 debugging level (0 is off)\n"); printf(" -D DATADIR database directory\n"); printf(" -e use European date format\n"); printf(" -E echo query before execution\n"); @@ -1173,11 +1173,13 @@ usage(char *progname) printf(" -P disable system indexes\n"); printf(" -s show statistics after each query\n"); printf(" -S SORT-MEM set amount of memory for sorts (in kbytes)\n"); - printf("Developer options:\n"); - printf(" -f [s|i|n|m|h] forbid use of some plan types\n"); + printf(" --help show this help, then exit\n"); + printf(" --version output version information, then exit\n"); + printf("\nDeveloper options:\n"); + printf(" -f s|i|n|m|h forbid use of some plan types\n"); printf(" -i do not execute queries\n"); printf(" -O allow system table structure changes\n"); - printf(" -t [pa|pl|ex] show timings after each query\n"); + printf(" -t pa|pl|ex show timings after each query\n"); printf(" -W NUM wait NUM seconds to allow attach from a debugger\n"); printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"); } @@ -1767,7 +1769,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.303 $ $Date: 2002/10/14 23:49:20 $\n"); + puts("$Revision: 1.304 $ $Date: 2002/10/18 22:05:35 $\n"); } /* diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh index 60c4469adda..e02c498acb1 100644 --- a/src/bin/initdb/initdb.sh +++ b/src/bin/initdb/initdb.sh @@ -27,7 +27,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.175 2002/09/24 23:14:25 tgl Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.176 2002/10/18 22:05:35 petere Exp $ # #------------------------------------------------------------------------- @@ -335,24 +335,30 @@ if [ "$usage" ]; then echo "$CMDNAME initializes a PostgreSQL database cluster." echo echo "Usage:" - echo " $CMDNAME [options] datadir" + echo " $CMDNAME [OPTION]... [DATADIR]" echo echo "Options:" - echo " [-D, --pgdata] DATADIR Location for this database cluster" - echo " -W, --pwprompt Prompt for a password for the new superuser" - echo " -E, --encoding ENCODING Set default encoding for new databases" - echo " --locale LOCALE Initialize database cluster with given locale" - echo " --lc-collate, --lc-ctype, --lc-messages LOCALE" - echo " --lc-monetary, --lc-numeric, --lc-time LOCALE" - echo " Initialize database cluster with given locale" - echo " in the respective category" - echo " (default taken from environment)" - echo " --no-locale Equivalent to --locale=C" - echo " -U, --username NAME Database superuser name" + echo " [-D, --pgdata=]DATADIR location for this database cluster" + echo " -E, --encoding=ENCODING set default encoding for new databases" + echo " --locale=LOCALE initialize database cluster with given locale" + echo " --lc-collate, --lc-ctype, --lc-messages=LOCALE" + echo " --lc-monetary, --lc-numeric, --lc-time=LOCALE" + echo " initialize database cluster with given locale" + echo " in the respective category (default taken from" + echo " environment)" + echo " --no-locale equivalent to --locale=C" + echo " -U, --username=NAME database superuser name" + echo " -W, --pwprompt prompt for a password for the new superuser" + echo " --help show this help, then exit" + echo " --version output version information, then exit" + echo echo "Less commonly used options: " - echo " -L DIRECTORY Where to find the input files" - echo " -d, --debug Generate lots of debugging output" - echo " -n, --noclean Do not clean up after errors" + echo " -d, --debug generate lots of debugging output" + echo " -L DIRECTORY where to find the input files" + echo " -n, --noclean do not clean up after errors" + echo + echo "If the data directory is not specified, the environment variable PGDATA" + echo "is used." echo echo "Report bugs to <pgsql-bugs@postgresql.org>." exit 0 diff --git a/src/bin/initlocation/initlocation.sh b/src/bin/initlocation/initlocation.sh index 9b4b27fd4af..bb53d0de8a8 100644 --- a/src/bin/initlocation/initlocation.sh +++ b/src/bin/initlocation/initlocation.sh @@ -9,7 +9,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.14 2002/06/20 20:29:41 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.15 2002/10/18 22:05:35 petere Exp $ # #------------------------------------------------------------------------- @@ -64,7 +64,8 @@ done if [ "$usage" ]; then - echo "$CMDNAME initializes an alternative filesystem location for database creation." + echo "$CMDNAME initializes an alternative filesystem location for database" + echo "creation." echo "" echo "Usage:" echo " $CMDNAME LOCATION" diff --git a/src/bin/ipcclean/ipcclean.sh b/src/bin/ipcclean/ipcclean.sh index d3ce8eae203..24f703197c9 100644 --- a/src/bin/ipcclean/ipcclean.sh +++ b/src/bin/ipcclean/ipcclean.sh @@ -1,12 +1,13 @@ #!/bin/sh # -# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/ipcclean.sh,v 1.12 2001/09/30 22:17:50 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/ipcclean.sh,v 1.13 2002/10/18 22:05:35 petere Exp $ # CMDNAME=`basename $0` if [ "$1" = '-?' -o "$1" = "--help" ]; then - echo "$CMDNAME cleans up shared memory and semaphores from aborted PostgreSQL backends." + echo "$CMDNAME cleans up shared memory and semaphores from aborted PostgreSQL" + echo "backends." echo echo "Usage:" echo " $CMDNAME" diff --git a/src/bin/pg_config/pg_config.sh b/src/bin/pg_config/pg_config.sh index c034c0b9dd9..ce0cde1be47 100644 --- a/src/bin/pg_config/pg_config.sh +++ b/src/bin/pg_config/pg_config.sh @@ -7,7 +7,7 @@ # Author: Peter Eisentraut <peter_e@gmx.net> # Public domain -# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.6 2001/09/30 22:17:51 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.7 2002/10/18 22:05:35 petere Exp $ me=`basename $0` @@ -23,9 +23,10 @@ val_version='@version@' help="\ $me provides information about the installed version of PostgreSQL. -Usage: $me --bindir | --includedir | --includedir-server | --libdir | --pkglibdir | --configure | --version +Usage: + $me OPTION... -Operation modes: +Options: --bindir show location of user executables --includedir show location of C header files of the client interfaces @@ -34,7 +35,8 @@ Operation modes: --pkglibdir show location of dynamically loadable modules --configure show options given to 'configure' script when PostgreSQL was built - --version show the PostgreSQL version and exit + --version show the PostgreSQL version, then exit + --help show this help, then exit Report bugs to <pgsql-bugs@postgresql.org>." diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index d126bef2e7a..2a6c5c7d807 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -6,7 +6,7 @@ * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; * licence: BSD * - * $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.6 2002/09/04 20:31:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.7 2002/10/18 22:05:35 petere Exp $ */ #include "postgres.h" @@ -25,7 +25,7 @@ static void usage(const char *progname) { - printf(_("%s displays PostgreSQL database cluster control information.\n"), progname); + printf(_("%s displays PostgreSQL database cluster control information.\n\n"), progname); printf(_("Usage:\n %s [DATADIR]\n\n"), progname); printf(_("If not data directory is specified, the environment variable PGDATA\nis used.\n\n")); printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n")); diff --git a/src/bin/pg_ctl/pg_ctl.sh b/src/bin/pg_ctl/pg_ctl.sh index 467c56774f4..0c7341bd9bc 100755 --- a/src/bin/pg_ctl/pg_ctl.sh +++ b/src/bin/pg_ctl/pg_ctl.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.29 2002/08/17 15:12:07 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.30 2002/10/18 22:05:35 petere Exp $ # #------------------------------------------------------------------------- @@ -26,29 +26,30 @@ Usage: $CMDNAME status [-D DATADIR] Common options: - -D DATADIR Location of the database storage area - -s Only print errors, no informational messages - -w Wait until operation completes - -W Do not wait until operation completes + -D DATADIR location of the database storage area + -s only print errors, no informational messages + -w wait until operation completes + -W do not wait until operation completes + --help show this help, then exit + --version output version information, then exit (The default is to wait for shutdown, but not for start or restart.) If the -D option is omitted, the environment variable PGDATA is used. Options for start or restart: - -l FILENAME Write (or append) server log to FILENAME. The - use of this option is highly recommended. - -o OPTIONS Command line options to pass to the postmaster - (PostgreSQL server executable) - -p PATH-TO-POSTMASTER Normally not necessary + -l FILENAME write (or append) server log to FILENAME. The + use of this option is highly recommended. + -o OPTIONS command line options to pass to the postmaster + (PostgreSQL server executable) + -p PATH-TO-POSTMASTER normally not necessary Options for stop or restart: - -m SHUTDOWN-MODE May be 'smart', 'fast', or 'immediate' + -m SHUTDOWN-MODE may be 'smart', 'fast', or 'immediate' Shutdown modes are: - smart Quit after all clients have disconnected - fast Quit directly, with proper shutdown - immediate Quit without complete shutdown; will lead - to recovery run on restart + smart quit after all clients have disconnected + fast quit directly, with proper shutdown + immediate quit without complete shutdown; will lead to recovery on restart Report bugs to <pgsql-bugs@postgresql.org>." diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 8c52fad99bf..0a28eeacae4 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -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")); diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index fbf1fe83417..9de608d406c 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.8 2002/09/22 20:57:20 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.9 2002/10/18 22:05:36 petere Exp $ * *------------------------------------------------------------------------- */ @@ -213,36 +213,43 @@ help(void) { printf(_("%s extracts a PostgreSQL database cluster into an SQL script file.\n\n"), progname); printf(_("Usage:\n")); - printf(_(" %s [OPTIONS]\n\n"), progname); + printf(_(" %s [OPTION]...\n"), progname); - printf(_("Options:\n")); + printf(_("\nOptions:\n")); #ifdef HAVE_GETOPT_LONG printf(_(" -c, --clean clean (drop) databases prior to create\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(_(" -g, --globals-only dump only global objects, no databases\n")); - printf(_(" -h, --host=HOSTNAME database server host name\n")); printf(_(" -i, --ignore-version proceed even when server version mismatches\n" " pg_dumpall version\n")); printf(_(" -o, --oids include OIDs in dump\n")); - printf(_(" -p, --port=PORT database server port number\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")); -#else /* not HAVE_GETOPT_LONG */ +#else /* not HAVE_GETOPT_LONG */ printf(_(" -c clean (drop) databases prior to create\n")); printf(_(" -d dump data as INSERT, rather than COPY, commands\n")); printf(_(" -D dump data as INSERT commands with column names\n")); printf(_(" -g dump only global objects, no databases\n")); - printf(_(" -h HOSTNAME database server host name\n")); printf(_(" -i proceed even when server version mismatches\n" " pg_dumpall version\n")); printf(_(" -o include OIDs in dump\n")); + printf(_(" -v verbose mode\n")); +#endif /* not HAVE_GETOPT_LONG */ + printf(_(" --help show this help, then exit\n")); + printf(_(" --version output version information, then exit\n")); + + 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(_(" -v verbose mode\n")); printf(_(" -W force password prompt (should happen automatically)\n")); -#endif /* not HAVE_GETOPT_LONG */ +#endif /* not HAVE_GETOPT_LONG */ printf(_("\nThe SQL script will be written to the standard output.\n\n")); printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n")); diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index f1a6f482c23..46a3ee8b2e9 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -34,7 +34,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.42 2002/09/22 20:57:20 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.43 2002/10/18 22:05:36 petere Exp $ * *------------------------------------------------------------------------- */ @@ -375,27 +375,39 @@ usage(const char *progname) { printf(_("%s restores a PostgreSQL database from an archive created by pg_dump.\n\n"), progname); printf(_("Usage:\n")); - printf(_(" %s [OPTIONS] [FILE]\n\n"), progname); - printf(_("Options:\n")); + printf(_(" %s [OPTION]... [FILE]\n"), progname); + printf(_("\nGeneral options:\n")); #ifdef HAVE_GETOPT_LONG - printf(_(" -a, --data-only restore only the data, no schema\n")); - printf(_(" -c, --clean clean (drop) schema prior to create\n")); - printf(_(" -C, --create issue commands to create the database\n")); printf(_(" -d, --dbname=NAME output database name\n")); printf(_(" -f, --file=FILENAME output file name\n")); - printf(_(" -F, --format={c|t} specify backup file format\n")); - printf(_(" -h, --host=HOSTNAME database server host name\n")); + printf(_(" -F, --format=c|t specify backup file format\n")); printf(_(" -i, --ignore-version proceed even when server version mismatches\n")); - printf(_(" -I, --index=NAME restore named index\n")); printf(_(" -l, --list print summarized TOC of the archive\n")); + printf(_(" -v, --verbose verbose mode\n")); +#else /* not HAVE_GETOPT_LONG */ + printf(_(" -d NAME output database name\n")); + printf(_(" -f FILENAME output file name\n")); + printf(_(" -F c|t specify backup file format\n")); + printf(_(" -i proceed even when server version mismatches\n")); + printf(_(" -l print summarized TOC of the archive\n")); + printf(_(" -v verbose mode\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 restore only the data, no schema\n")); + printf(_(" -c, --clean clean (drop) schema prior to create\n")); + printf(_(" -C, --create issue commands to create the database\n")); + printf(_(" -I, --index=NAME restore named index\n")); printf(_(" -L, --use-list=FILENAME use specified table of contents for ordering\n" " output from this file\n")); printf(_(" -N, --orig-order restore in original dump order\n")); printf(_(" -o, --oid-order restore in OID order\n")); printf(_(" -O, --no-owner do not reconnect to database to match\n" " object owner\n")); - printf(_(" -p, --port=PORT database server port number\n")); printf(_(" -P, --function=NAME(args)\n" " restore named function\n")); printf(_(" -r, --rearrange rearrange output to put indexes etc. at end\n")); @@ -405,34 +417,23 @@ usage(const char *progname) " disabling triggers\n")); printf(_(" -t, --table=NAME restore named table\n")); printf(_(" -T, --trigger=NAME restore named trigger\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 skip restoration of access privileges (grant/revoke)\n")); printf(_(" -X use-set-session-authorization, --use-set-session-authorization\n" " use SET SESSION AUTHORIZATION commands instead\n" - " of reconnecting, if possible\n")); + " of reconnecting, if possible\n")); printf(_(" -X disable-triggers, --disable-triggers\n" " disable triggers during data-only restore\n")); - -#else /* not HAVE_GETOPT_LONG */ +#else /* not HAVE_GETOPT_LONG */ printf(_(" -a restore only the data, no schema\n")); printf(_(" -c clean (drop) schema prior to create\n")); printf(_(" -C issue commands to create the database\n")); - printf(_(" -d NAME output database name\n")); - printf(_(" -f FILENAME output file name\n")); - printf(_(" -F {c|t} specify backup file format\n")); - printf(_(" -h HOSTNAME database server host name\n")); - printf(_(" -i proceed even when server version mismatches\n")); printf(_(" -I NAME restore named index\n")); - printf(_(" -l print summarized TOC of the archive\n")); printf(_(" -L FILENAME use specified table of contents for ordering\n" " output from this file\n")); printf(_(" -N restore in original dump order\n")); printf(_(" -o restore in OID order\n")); printf(_(" -O do not reconnect to database to match\n" " object owner\n")); - printf(_(" -p PORT database server port number\n")); printf(_(" -P NAME(args) restore named function\n")); printf(_(" -r rearrange output to put indexes etc. at end\n")); printf(_(" -R disallow ALL reconnections to the database\n")); @@ -441,15 +442,25 @@ usage(const char *progname) " disabling triggers\n")); printf(_(" -t NAME restore named table\n")); printf(_(" -T NAME restore named trigger\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 skip restoration of access privileges (grant/revoke)\n")); printf(_(" -X use-set-session-authorization\n" " use SET SESSION AUTHORIZATION commands instead\n" - " of reconnecting, if possible\n")); + " of reconnecting, if possible\n")); printf(_(" -X disable-triggers disable triggers during data-only restore\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 input file name is supplied, then standard input is used.\n\n")); printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n")); diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index 81fb79b3a39..ee6a3b51732 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.7 2002/10/02 21:30:13 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.8 2002/10/18 22:05:36 petere Exp $ * *------------------------------------------------------------------------- */ @@ -692,12 +692,14 @@ static void usage(void) { printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname); - printf(_("Usage:\n %s [OPTIONS] DATADIR\n\n"), progname); + printf(_("Usage:\n %s [OPTION]... DATADIR\n\n"), progname); printf(_("Options:\n")); - printf(_(" -f force update to be done\n")); - printf(_(" -l FILEID,SEG force minimum WAL starting location for new transaction log\n")); - printf(_(" -n no update, just show extracted control values (for testing)\n")); - printf(_(" -o OID set next OID\n")); - printf(_(" -x XID set next transaction ID\n")); + printf(_(" -f force update to be done\n")); + printf(_(" -l FILEID,SEG force minimum WAL starting location for new transaction log\n")); + printf(_(" -n no update, just show extracted control values (for testing)\n")); + printf(_(" -o OID set next OID\n")); + printf(_(" -x XID set next transaction ID\n")); + printf(_(" --help show this help, then exit\n")); + printf(_(" --version output version information, then exit\n")); printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n")); } diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 6f90450b1e3..af60be1bca9 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.57 2002/09/22 20:57:21 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.58 2002/10/18 22:05:36 petere Exp $ */ #include "postgres_fe.h" #include "print.h" @@ -83,58 +83,58 @@ usage(void) printf(_("This is psql %s, the PostgreSQL interactive terminal.\n\n"), PG_VERSION); puts(_("Usage:")); - puts(_(" psql [OPTIONS] [DBNAME [USERNAME]]\n")); - puts(_("Options:")); - puts(_(" -a Echo all input from script")); - puts(_(" -A Unaligned table output mode (-P format=unaligned)")); - puts(_(" -c COMMAND Run only single command (SQL or internal) and exit")); + puts(_(" psql [OPTIONS]... [DBNAME [USERNAME]]\n")); + puts(_("General options:")); /* Display default database */ env = getenv("PGDATABASE"); if (!env) env = user; - printf(_(" -d DBNAME Specify database name to connect to (default: %s)\n"), env); - - puts(_(" -e Echo commands sent to server")); - puts(_(" -E Display queries that internal commands generate")); - puts(_(" -f FILENAME Execute commands from file, then exit")); - printf(_(" -F STRING Set field separator (default: \"%s\") (-P fieldsep=)\n"), + printf(_(" -d DBNAME specify database name to connect to (default: %s)\n"), env); + puts(_(" -c COMMAND run only single command (SQL or internal) and exit")); + puts(_(" -f FILENAME execute commands from file, then exit")); + puts(_(" -l list available databases, then exit")); + puts(_(" -v NAME=VALUE set psql variable 'NAME' to 'VALUE'")); + puts(_(" -X do not read startup file (~/.psqlrc)")); + puts(_(" --help show this help, then exit")); + puts(_(" --version output version information, then exit")); + + puts(_("\nInput and output options:")); + puts(_(" -a echo all input from script")); + puts(_(" -e echo commands sent to server")); + puts(_(" -E display queries that internal commands generate")); + puts(_(" -q run quietly (no messages, only query output)")); + puts(_(" -o FILENAME send query results to file (or |pipe)")); + puts(_(" -n disable enhanced command line editing (readline)")); + puts(_(" -s single step mode (confirm each query)")); + puts(_(" -S single line mode (end of line terminates SQL command)")); + + puts(_("\nOutput format options:")); + puts(_(" -A unaligned table output mode (-P format=unaligned)")); + puts(_(" -H HTML table output mode (-P format=html)")); + puts(_(" -t print rows only (-P tuples_only)")); + puts(_(" -T TEXT set HTML table tag attributes (width, border) (-P tableattr=)")); + puts(_(" -x turn on expanded table output (-P expanded)")); + puts(_(" -P VAR[=ARG] set printing option 'VAR' to 'ARG' (see \\pset command)")); + printf(_(" -F STRING set field separator (default: \"%s\") (-P fieldsep=)\n"), DEFAULT_FIELD_SEP); + puts(_(" -R STRING set record separator (default: newline) (-P recordsep=)")); + puts(_("\nConnection options:")); /* Display default host */ env = getenv("PGHOST"); - printf(_(" -h HOSTNAME Specify database server host (default: %s)\n"), + printf(_(" -h HOSTNAME specify database server host (default: %s)\n"), env ? env : _("local socket")); - - puts(_(" -H HTML table output mode (-P format=html)")); - puts(_(" -l List available databases, then exit")); - puts(_(" -n Disable enhanced command line editing (readline)")); - puts(_(" -o FILENAME Send query results to file (or |pipe)")); - /* Display default port */ env = getenv("PGPORT"); - printf(_(" -p PORT Specify database server port (default: %s)\n"), + printf(_(" -p PORT specify database server port (default: %s)\n"), env ? env : DEF_PGPORT_STR); - - puts(_(" -P VAR[=ARG] Set printing option 'VAR' to 'ARG' (see \\pset command)")); - puts(_(" -q Run quietly (no messages, only query output)")); - puts(_(" -R STRING Set record separator (default: newline) (-P recordsep=)")); - puts(_(" -s Single step mode (confirm each query)")); - puts(_(" -S Single line mode (end of line terminates SQL command)")); - puts(_(" -t Print rows only (-P tuples_only)")); - puts(_(" -T TEXT Set HTML table tag attributes (width, border) (-P tableattr=)")); - /* Display default user */ env = getenv("PGUSER"); if (!env) env = user; - printf(_(" -U NAME Specify database user name (default: %s)\n"), env); - - puts(_(" -v NAME=VALUE Set psql variable 'NAME' to 'VALUE'")); - puts(_(" -V Show version information and exit")); - puts(_(" -W Prompt for password (should happen automatically)")); - puts(_(" -x Turn on expanded table output (-P expanded)")); - puts(_(" -X Do not read startup file (~/.psqlrc)")); + printf(_(" -U NAME specify database user name (default: %s)\n"), env); + puts(_(" -W prompt for password (should happen automatically)")); puts(_( "\nFor more information, type \"\\?\" (for internal commands) or \"\\help\"\n" diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 4ec21b9659b..16e7ed9c287 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.67 2002/09/22 20:57:21 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.68 2002/10/18 22:05:36 petere Exp $ */ #include "postgres_fe.h" @@ -640,11 +640,6 @@ showVersion(void) #if defined(USE_READLINE) puts(gettext("contains support for command-line editing")); #endif - - puts(gettext("Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group\n" - "Portions Copyright (c) 1996, Regents of the University of California\n" - "Read the file COPYRIGHT or use the command \\copyright to see the\n" - "usage and distribution terms.")); } diff --git a/src/bin/scripts/clusterdb b/src/bin/scripts/clusterdb index 1b2bd6c0b30..bc66c319765 100644 --- a/src/bin/scripts/clusterdb +++ b/src/bin/scripts/clusterdb @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.6 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.7 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -109,22 +109,25 @@ do done if [ "$usage" ]; then - echo "$CMDNAME cluster all previously clustered tables in a database" + echo "$CMDNAME cluster all previously clustered tables in a database." echo echo "Usage:" - echo " $CMDNAME [options] [dbname]" + echo " $CMDNAME [OPTION]... [DBNAME]" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -d, --dbname=DBNAME Database to cluster" - echo " -a, --all Cluster all databases" - echo " -t, --table='TABLE' Cluster specific table only" - echo " -v, --verbose Write a lot of output" - echo " -e, --echo Show the command being sent to the backend" - echo " -q, --quiet Don't write any output" + echo " -a, --all cluster all databases" + echo " -d, --dbname=DBNAME database to cluster" + echo " -t, --table='TABLE' cluster specific table only" + echo " -e, --echo show the command being sent to the backend" + echo " -q, --quiet don't write any output" + echo " -v, --verbose write a lot of output" + echo " --help show this help, then exit" + echo + echo "Connection options:" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" echo echo "Read the description of the SQL command CLUSTER for details." echo diff --git a/src/bin/scripts/createdb b/src/bin/scripts/createdb index e951ed40a0d..751de6cd223 100644 --- a/src/bin/scripts/createdb +++ b/src/bin/scripts/createdb @@ -12,7 +12,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.27 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.28 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -134,19 +134,22 @@ if [ "$usage" ]; then echo "$CMDNAME creates a PostgreSQL database." echo echo "Usage:" - echo " $CMDNAME [options] [dbname] [description]" + echo " $CMDNAME [OPTION]... [DBNAME] [DESCRIPTION]" echo echo "Options:" - echo " -O, --owner=OWNER Database user to own the new database" - echo " -D, --location=PATH Alternative place to store the database" - echo " -T, --template=TEMPLATE Template database to copy" - echo " -E, --encoding=ENCODING Encoding for the database" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -e, --echo Show the query being sent to the backend" - echo " -q, --quiet Don't write any messages" + echo " -D, --location=PATH alternative place to store the database" + echo " -E, --encoding=ENCODING encoding for the database" + echo " -O, --owner=OWNER database user to own the new database" + echo " -T, --template=TEMPLATE template database to copy" + echo " -e, --echo show the query being sent to the backend" + echo " -q, --quiet don't write any messages" + echo " --help show this help, then exit" + echo + echo "Connection options:" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" echo echo "By default, a database with the same name as the current user is created." echo diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh index 5ef9fffe4b7..ff94874413f 100644 --- a/src/bin/scripts/createlang.sh +++ b/src/bin/scripts/createlang.sh @@ -7,7 +7,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.41 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.42 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -130,16 +130,17 @@ if [ -n "$usage" ]; then echo "$CMDNAME installs a procedural language into a PostgreSQL database." echo echo "Usage:" - echo " $CMDNAME [options] langname [dbname]" + echo " $CMDNAME [OPTION]... LANGNAME [DBNAME]" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -d, --dbname=DBNAME Database to install language in" - echo " -L, --pglib=DIRECTORY Find language interpreter file in DIRECTORY" - echo " -l, --list Show a list of currently installed languages" + echo " -d, --dbname=DBNAME database to install language in" + echo " -l, --list show a list of currently installed languages" + echo " -L, --pglib=DIRECTORY find language interpreter file in DIRECTORY" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" + echo " --help show this help, then exit" echo echo "Report bugs to <pgsql-bugs@postgresql.org>." exit 0 diff --git a/src/bin/scripts/createuser b/src/bin/scripts/createuser index ee758bdb872..f3983cfcba3 100644 --- a/src/bin/scripts/createuser +++ b/src/bin/scripts/createuser @@ -9,7 +9,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.28 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.29 2002/10/18 22:05:36 petere Exp $ # # Note - this should NOT be setuid. # @@ -141,25 +141,28 @@ if [ "$usage" ]; then echo "$CMDNAME creates a new PostgreSQL user." echo echo "Usage:" - echo " $CMDNAME [options] [username]" + echo " $CMDNAME [OPTION]... [USERNAME]" echo echo "Options:" - echo " -d, --createdb User can create new databases" - echo " -D, --no-createdb User cannot create databases" - echo " -a, --adduser User can add new users" - echo " -A, --no-adduser User cannot add new users" - echo " -i, --sysid=SYSID Select sysid for new user" - echo " -P, --pwprompt Assign a password to new user" - echo " -E, --encrypted Encrypt stored password" - echo " -N, --unencrypted Do no encrypt stored password" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as (not the one to create)" - echo " -W, --password Prompt for password to connect" - echo " -e, --echo Show the query being sent to the backend" - echo " -q, --quiet Don't write any messages" + echo " -a, --adduser user can add new users" + echo " -A, --no-adduser user cannot add new users" + echo " -d, --createdb user can create new databases" + echo " -D, --no-createdb user cannot create databases" + echo " -P, --pwprompt assign a password to new user" + echo " -E, --encrypted encrypt stored password" + echo " -N, --unencrypted do no encrypt stored password" + echo " -i, --sysid=SYSID select sysid for new user" + echo " -e, --echo show the query being sent to the backend" + echo " -q, --quiet don't write any messages" + echo " --help show this help, then exit" echo - echo "If one of -d, -D, -a, -A, and 'username' is not specified, you will" + echo "Connection options:" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as (not the one to create)" + echo " -W, --password prompt for password to connect" + echo + echo "If one of -a, -A, -d, -D, and USERNAME is not specified, you will" echo "be prompted interactively." echo echo "Report bugs to <pgsql-bugs@postgresql.org>." diff --git a/src/bin/scripts/dropdb b/src/bin/scripts/dropdb index 92892f6d1cd..e8df0d5a5e4 100644 --- a/src/bin/scripts/dropdb +++ b/src/bin/scripts/dropdb @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.18 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.19 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -104,16 +104,17 @@ if [ "$usage" ]; then echo "$CMDNAME removes a PostgreSQL database." echo echo "Usage:" - echo " $CMDNAME [options] dbname" + echo " $CMDNAME [OPTION]... DBNAME" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -i, --interactive Prompt before deleting anything" - echo " -e, --echo Show the query being sent to the backend" - echo " -q, --quiet Don't write any messages" + echo " -e, --echo show the query being sent to the backend" + echo " -i, --interactive prompt before deleting anything" + echo " -q, --quiet don't write any messages" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" + echo " --help show this help, then exit" echo echo "Report bugs to <pgsql-bugs@postgresql.org>." exit 0 diff --git a/src/bin/scripts/droplang b/src/bin/scripts/droplang index 8d90250c5d9..5792e795ecf 100644 --- a/src/bin/scripts/droplang +++ b/src/bin/scripts/droplang @@ -7,7 +7,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.26 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.27 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -120,15 +120,16 @@ if [ "$usage" ]; then echo "$CMDNAME removes a procedural language from a database." echo echo "Usage:" - echo " $CMDNAME [options] langname [dbname]" + echo " $CMDNAME [OPTION]... LANGNAME [DBNAME]" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -d, --dbname=DBNAME Database to remove language from" - echo " -l, --list Show a list of currently installed languages" + echo " -d, --dbname=DBNAME database to remove language from" + echo " -l, --list show a list of currently installed languages" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" + echo " --help show this help, then exit" echo echo "Report bugs to <pgsql-bugs@postgresql.org>." exit 0 diff --git a/src/bin/scripts/dropuser b/src/bin/scripts/dropuser index 49cbf7fc639..af113051160 100644 --- a/src/bin/scripts/dropuser +++ b/src/bin/scripts/dropuser @@ -9,7 +9,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.20 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.21 2002/10/18 22:05:36 petere Exp $ # # Note - this should NOT be setuid. # @@ -110,16 +110,17 @@ if [ "$usage" ]; then echo "$CMDNAME removes a PostgreSQL user." echo echo "Usage:" - echo " $CMDNAME [options] [username]" + echo " $CMDNAME [OPTION]... [USERNAME]" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as (not the one to drop)" - echo " -W, --password Prompt for password to connect" - echo " -i, --interactive Prompt before deleting anything" - echo " -e, --echo Show the query being sent to the backend" - echo " -q, --quiet Don't write any messages" + echo " -e, --echo show the query being sent to the backend" + echo " -i, --interactive prompt before deleting anything" + echo " -q, --quiet don't write any messages" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as (not the one to drop)" + echo " -W, --password prompt for password to connect" + echo " --help show this help, then exit" echo echo "Report bugs to <pgsql-bugs@postgresql.org>." exit 0 diff --git a/src/bin/scripts/vacuumdb b/src/bin/scripts/vacuumdb index b1ac81f489e..1a0e9114550 100644 --- a/src/bin/scripts/vacuumdb +++ b/src/bin/scripts/vacuumdb @@ -12,7 +12,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.25 2002/10/16 03:44:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.26 2002/10/18 22:05:36 petere Exp $ # #------------------------------------------------------------------------- @@ -126,21 +126,24 @@ if [ "$usage" ]; then echo "$CMDNAME cleans and analyzes a PostgreSQL database." echo echo "Usage:" - echo " $CMDNAME [options] [dbname]" + echo " $CMDNAME [OPTION]... [DBNAME]" echo echo "Options:" - echo " -h, --host=HOSTNAME Database server host" - echo " -p, --port=PORT Database server port" - echo " -U, --username=USERNAME Username to connect as" - echo " -W, --password Prompt for password" - echo " -d, --dbname=DBNAME Database to vacuum" - echo " -a, --all Vacuum all databases" - echo " -t, --table='TABLE[(columns)]' Vacuum specific table only" - echo " -f, --full Do full vacuuming" - echo " -v, --verbose Write a lot of output" - echo " -z, --analyze Update optimizer hints" - echo " -e, --echo Show the command being sent to the backend" - echo " -q, --quiet Don't write any output" + echo " -a, --all vacuum all databases" + echo " -d, --dbname=DBNAME database to vacuum" + echo " -t, --table='TABLE[(columns)]' vacuum specific table only" + echo " -f, --full do full vacuuming" + echo " -z, --analyze update optimizer hints" + echo " -e, --echo show the command being sent to the backend" + echo " -q, --quiet don't write any output" + echo " -v, --verbose write a lot of output" + echo " --help show this help, then exit" + echo + echo "Connection options:" + echo " -h, --host=HOSTNAME database server host" + echo " -p, --port=PORT database server port" + echo " -U, --username=USERNAME user name to connect as" + echo " -W, --password prompt for password" echo echo "Read the description of the SQL command VACUUM for details." echo diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 8de38196676..04c745775d2 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.57 2002/09/04 20:31:46 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.58 2002/10/18 22:05:36 petere Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ @@ -29,27 +29,23 @@ help(const char *progname) { printf("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n", progname); - /* printf is a macro some places; don't #ifdef inside its arguments */ -#ifdef YYDEBUG printf("Usage:\n" - " %s [-d] [-I DIRECTORY] [-o OUTFILE] [-t] [-c] [-D symbol] file1 [file2...]\n\n", + " %s [OPTION]... FILE...\n\n", progname); -#else - printf("Usage:\n" - " %s [-I DIRECTORY] [-o OUTFILE] [-t] [-c] [-D symbol] file1 [file2...]\n\n", - progname); -#endif printf("Options:\n"); + printf(" -c automatically generate C code from embedded SQL code;\n" + " currently this works for EXEC SQL TYPE\n"); #ifdef YYDEBUG - printf(" -d generate parser debug output\n"); + printf(" -d generate parser debug output\n"); #endif - printf(" -I DIRECTORY search DIRECTORY for include files\n"); - printf(" -o OUTFILE write result to OUTFILE\n"); - printf(" -t turn on autocommit of transactions\n"); - printf(" -c automatically generate C code from embedded SQL code\n currently this works for EXEC SQL TYPE\n"); - printf(" -D symbol define symbo\n"); - printf("\nIf no output file is specified, the name is formed by adding .c\n" - "to the input file name, after stripping off .pgc if present.\n"); + printf(" -D SYMBOL define SYMBOL\n"); + printf(" -I DIRECTORY search DIRECTORY for include files\n"); + printf(" -o OUTFILE write result to OUTFILE\n"); + printf(" -t turn on autocommit of transactions\n"); + printf(" --help show this help, then exit\n"); + printf(" --version output version information, then exit\n"); + printf("\nIf no output file is specified, the name is formed by adding .c to the\n" + "input file name, after stripping off .pgc if present.\n"); printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"); } -- GitLab