diff options
author | Tom Lane | 2007-12-11 19:57:32 +0000 |
---|---|---|
committer | Tom Lane | 2007-12-11 19:57:32 +0000 |
commit | b60053dd5a764f376f07be2cf2afe00ebc478f3d (patch) | |
tree | 320cdbd6ba5a9b03c4d5f5778d494e00a866f144 | |
parent | 0e905d89b8220bec8e1483cd826decad707e9f50 (diff) |
Make documentation of -W options more accurate and uniform.
25 files changed, 200 insertions, 54 deletions
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c index a6711ce5bd..b32d9e5bfe 100644 --- a/contrib/vacuumlo/vacuumlo.c +++ b/contrib/vacuumlo/vacuumlo.c @@ -308,7 +308,7 @@ usage(void) fprintf(stdout, " -v\t\tWrite a lot of progress messages\n"); fprintf(stdout, " -n\t\tDon't remove large objects, just show what would be done\n"); fprintf(stdout, " -U username\tUsername to connect as\n"); - fprintf(stdout, " -W\t\tPrompt for password\n"); + fprintf(stdout, " -W\t\tForce password prompt\n"); fprintf(stdout, " -h hostname\tDatabase server host\n"); fprintf(stdout, " -p port\tDatabase server port\n\n"); } diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml index fa62349cdb..56266dc1af 100644 --- a/doc/src/sgml/ref/clusterdb.sgml +++ b/doc/src/sgml/ref/clusterdb.sgml @@ -164,7 +164,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>clusterdb</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>clusterdb</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>clusterdb</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 7ccdaf9754..97c38ed4b8 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -183,7 +183,7 @@ PostgreSQL documentation <term><option>--username <replaceable class="parameter">username</replaceable></></term> <listitem> <para> - User name to connect as + User name to connect as. </para> </listitem> </varlistentry> @@ -193,7 +193,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>createdb</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>createdb</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>createdb</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/createlang.sgml b/doc/src/sgml/ref/createlang.sgml index 2ca9481e89..06c4c5806c 100644 --- a/doc/src/sgml/ref/createlang.sgml +++ b/doc/src/sgml/ref/createlang.sgml @@ -144,7 +144,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>createlang</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>createlang</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>createlang</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index 5633065c54..0600424003 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -295,9 +295,20 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt (to connect to the server, not for the + Force <application>createuser</application> to prompt for a + password (for connecting to the server, not for the password of the new user). </para> + + <para> + This option is never essential, since + <application>createuser</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>createuser</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. + </para> </listitem> </varlistentry> </variablelist> diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index b5ba038056..d2fce6d55a 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -123,7 +123,7 @@ PostgreSQL documentation <term><option>--username <replaceable class="parameter">username</replaceable></></term> <listitem> <para> - User name to connect as + User name to connect as. </para> </listitem> </varlistentry> @@ -133,7 +133,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>dropdb</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>dropdb</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>dropdb</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/droplang.sgml b/doc/src/sgml/ref/droplang.sgml index 4b60ee14ea..d22dbc509e 100644 --- a/doc/src/sgml/ref/droplang.sgml +++ b/doc/src/sgml/ref/droplang.sgml @@ -142,7 +142,7 @@ PostgreSQL documentation <term><option>--username <replaceable class="parameter">username</replaceable></></term> <listitem> <para> - User name to connect as + User name to connect as. </para> </listitem> </varlistentry> @@ -152,7 +152,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>droplang</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>droplang</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>droplang</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index 24cd5f337f..d97cc99f5d 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -125,7 +125,7 @@ PostgreSQL documentation <term><option>--username <replaceable class="parameter">username</replaceable></></term> <listitem> <para> - User name to connect as (not the user name to drop) + User name to connect as (not the user name to drop). </para> </listitem> </varlistentry> @@ -135,8 +135,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt (to connect to the server, not for the - password of the user to be dropped). + Force <application>dropuser</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>dropuser</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>dropuser</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 89dc9a1079..f89cfc053d 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -647,7 +647,7 @@ PostgreSQL documentation <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> - Connect as the given user. + User name to connect as. </para> </listitem> </varlistentry> @@ -657,8 +657,18 @@ PostgreSQL documentation <term><option>--password</option></term> <listitem> <para> - Force a password prompt. This should happen automatically if - the server requires password authentication. + Force <application>pg_dump</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>pg_dump</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>pg_dump</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 576d3fdd92..6f924f2bfb 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -59,7 +59,7 @@ PostgreSQL documentation <para> <application>pg_dumpall</application> needs to connect several times to the <productname>PostgreSQL</productname> server (once per - database). If you use password authentication it is likely to ask for + database). If you use password authentication it will ask for a password each time. It is convenient to have a <filename>~/.pgpass</> file in such cases. See <xref linkend="libpq-pgpass"> for more information. @@ -367,7 +367,7 @@ PostgreSQL documentation <term>--username=<replaceable>username</replaceable></term> <listitem> <para> - Connect as the given user. + User name to connect as. </para> </listitem> </varlistentry> @@ -377,8 +377,24 @@ PostgreSQL documentation <term>--password</term> <listitem> <para> - Force a password prompt. This should happen automatically if - the server requires password authentication. + Force <application>pg_dumpall</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>pg_dumpall</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>pg_dumpall</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. + </para> + + <para> + Note that the password prompt will occur again for each database + to be dumped. Usually, it's better to set up a + <filename>~/.pgpass</> file than to rely on manual password entry. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index 4fa352d682..fb7bd0aea3 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -458,7 +458,7 @@ <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> - Connect as the given user. + User name to connect as. </para> </listitem> </varlistentry> @@ -468,8 +468,18 @@ <term><option>--password</option></term> <listitem> <para> - Force a password prompt. This should happen automatically if - the server requires password authentication. + Force <application>pg_restore</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>pg_restore</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>pg_restore</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index c1ab88410a..bf1162fcec 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -406,25 +406,24 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Forces <application>psql</application> to prompt for a - password before connecting to a database. + Force <application>psql</application> to prompt for a + password before connecting to a database. </para> <para> - <application>psql</application> should automatically prompt for a - password whenever the server requests password authentication. - However, currently password request detection is not totally - reliable, hence this option to force a prompt. If no password - prompt is issued and the server requires password authentication, - the connection attempt will fail. + This option is never essential, since <application>psql</application> + will automatically prompt for a password if the server demands + password authentication. However, <application>psql</application> + will waste a connection attempt finding out that the server wants a + password. In some cases it is worth typing <option>-W</> to avoid + the extra connection attempt. </para> <para> - This option will remain set for the entire session, even if you - change the database connection with the meta-command - <command>\connect</command>. + Note that this option will remain set for the entire session, + and so it affects uses of the meta-command + <command>\connect</command> as well as the initial connection attempt. </para> - </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml index e4469bb12e..259b170860 100644 --- a/doc/src/sgml/ref/reindexdb.sgml +++ b/doc/src/sgml/ref/reindexdb.sgml @@ -186,7 +186,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>reindexdb</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>reindexdb</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>reindexdb</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 6b6493ef96..6a00946827 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -199,7 +199,7 @@ PostgreSQL documentation <term><option>--username <replaceable class="parameter">username</replaceable></></term> <listitem> <para> - User name to connect as + User name to connect as. </para> </listitem> </varlistentry> @@ -209,7 +209,18 @@ PostgreSQL documentation <term><option>--password</></term> <listitem> <para> - Force password prompt. + Force <application>vacuumdb</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>vacuumdb</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>vacuumdb</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/vacuumlo.sgml b/doc/src/sgml/vacuumlo.sgml index 349113ca7d..e05f2ef69e 100644 --- a/doc/src/sgml/vacuumlo.sgml +++ b/doc/src/sgml/vacuumlo.sgml @@ -38,42 +38,55 @@ vacuumlo [options] database [database2 ... databaseN] <varlistentry> <term><option>-v</option></term> <listitem> - <para>Write a lot of progress messages</para> + <para>Write a lot of progress messages.</para> </listitem> </varlistentry> <varlistentry> <term><option>-n</option></term> <listitem> - <para>Don't remove anything, just show what would be done</para> + <para>Don't remove anything, just show what would be done.</para> </listitem> </varlistentry> <varlistentry> <term><option>-U</option> <replaceable>username</></term> <listitem> - <para>Username to connect as</para> + <para>Username to connect as.</para> </listitem> </varlistentry> <varlistentry> <term><option>-W</option></term> <listitem> - <para>Force prompt for password (generally useless)</para> + <para> + Force <application>vacuumlo</application> to prompt for a + password before connecting to a database. + </para> + + <para> + This option is never essential, since + <application>vacuumlo</application> will automatically prompt + for a password if the server demands password authentication. + However, <application>vacuumlo</application> will waste a + connection attempt finding out that the server wants a password. + In some cases it is worth typing <option>-W</> to avoid the extra + connection attempt. + </para> </listitem> </varlistentry> <varlistentry> <term><option>-h</option> <replaceable>hostname</></term> <listitem> - <para>Database server's host</para> + <para>Database server's host.</para> </listitem> </varlistentry> <varlistentry> <term><option>-p</option> <replaceable>port</></term> <listitem> - <para>Database server's port</para> + <para>Database server's port.</para> </listitem> </varlistentry> </variablelist> diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 02be4d4150..224b94fd96 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -132,7 +132,7 @@ usage(void) if (!env) env = user; printf(_(" -U NAME database user name (default: \"%s\")\n"), env); - puts(_(" -W prompt for password (should happen automatically)")); + puts(_(" -W force password prompt (should happen automatically)")); puts(_( "\nFor more information, type \"\\?\" (for internal commands) or \"\\help\"\n" diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c index 2422693ef0..fc484e0508 100644 --- a/src/bin/scripts/clusterdb.c +++ b/src/bin/scripts/clusterdb.c @@ -236,7 +236,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_("\nRead the description of the SQL command CLUSTER for details.\n")); printf(_("\nReport bugs to <[email protected]>.\n")); } diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c index a12a8b3ce0..e2f320d5ad 100644 --- a/src/bin/scripts/createdb.c +++ b/src/bin/scripts/createdb.c @@ -218,7 +218,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_("\nBy default, a database with the same name as the current user is created.\n")); printf(_("\nReport bugs to <[email protected]>.\n")); } diff --git a/src/bin/scripts/createlang.c b/src/bin/scripts/createlang.c index a0f2f47958..565b7856de 100644 --- a/src/bin/scripts/createlang.c +++ b/src/bin/scripts/createlang.c @@ -212,7 +212,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nReport bugs to <[email protected]>.\n")); diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index db89ff725a..8eab51391e 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -329,7 +329,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as (not the one to create)\n")); - printf(_(" -W, --password prompt for password to connect\n")); + printf(_(" -W, --password force password prompt\n")); printf(_("\nIf one of -s, -S, -d, -D, -r, -R and ROLENAME is not specified, you will\n" "be prompted interactively.\n")); printf(_("\nReport bugs to <[email protected]>.\n")); diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c index 88d508c67a..06c88172d5 100644 --- a/src/bin/scripts/dropdb.c +++ b/src/bin/scripts/dropdb.c @@ -145,7 +145,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nReport bugs to <[email protected]>.\n")); diff --git a/src/bin/scripts/droplang.c b/src/bin/scripts/droplang.c index d687909b51..350d5698c6 100644 --- a/src/bin/scripts/droplang.c +++ b/src/bin/scripts/droplang.c @@ -329,7 +329,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nReport bugs to <[email protected]>.\n")); diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c index cf6d022366..a0967a9f89 100644 --- a/src/bin/scripts/dropuser.c +++ b/src/bin/scripts/dropuser.c @@ -144,7 +144,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as (not the one to drop)\n")); - printf(_(" -W, --password prompt for password to connect\n")); + printf(_(" -W, --password force password prompt\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nReport bugs to <[email protected]>.\n")); diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index c88c24d07d..c3816f27a5 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -322,7 +322,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_("\nRead the description of the SQL command REINDEX for details.\n")); printf(_("\nReport bugs to <[email protected]>.\n")); } diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 501179a6ea..f646b82891 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -265,7 +265,7 @@ help(const char *progname) printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port\n")); printf(_(" -U, --username=USERNAME user name to connect as\n")); - printf(_(" -W, --password prompt for password\n")); + printf(_(" -W, --password force password prompt\n")); printf(_("\nRead the description of the SQL command VACUUM for details.\n")); printf(_("\nReport bugs to <[email protected]>.\n")); } |