Fix -w and -W options. They were inverted.

This commit is contained in:
Takahiro Itagaki 2010-06-18 01:12:28 +00:00
parent 67a5d7b786
commit d490a1b458
5 changed files with 33 additions and 11 deletions

View File

@ -4,7 +4,7 @@
Summary: Reorganize tables in PostgreSQL databases without any locks. Summary: Reorganize tables in PostgreSQL databases without any locks.
Name: %{sname} Name: %{sname}
Version: 1.1.2 Version: 1.1.3
Release: 1%{?dist} Release: 1%{?dist}
License: BSD License: BSD
Group: Applications/Databases Group: Applications/Databases

View File

@ -8,7 +8,7 @@
* @brief Client Modules * @brief Client Modules
*/ */
const char *PROGRAM_VERSION = "1.1.2"; const char *PROGRAM_VERSION = "1.1.3";
const char *PROGRAM_URL = "http://reorg.projects.postgresql.org/"; const char *PROGRAM_URL = "http://reorg.projects.postgresql.org/";
const char *PROGRAM_EMAIL = "reorg-general@lists.pgfoundry.org"; const char *PROGRAM_EMAIL = "reorg-general@lists.pgfoundry.org";

View File

@ -475,8 +475,8 @@ static pgut_option default_options[] =
{ 's', 'h', "host" , &host }, { 's', 'h', "host" , &host },
{ 's', 'p', "port" , &port }, { 's', 'p', "port" , &port },
{ 's', 'U', "username" , &username }, { 's', 'U', "username" , &username },
{ 'y', 'w', "no-password" , &prompt_password }, { 'Y', 'w', "no-password" , &prompt_password },
{ 'Y', 'W', "password" , &prompt_password }, { 'y', 'W', "password" , &prompt_password },
{ 0 } { 0 }
}; };

View File

@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<h1 id="pg_reorg">pg_reorg 1.1.2</h1> <h1 id="pg_reorg">pg_reorg 1.1.3</h1>
<div class="navigation"> <div class="navigation">
<a href="index-ja.html">Top</a> &gt; <a href="index-ja.html">Top</a> &gt;
<a href="pg_reorg-ja.html">pg_reorg</a> <a href="pg_reorg-ja.html">pg_reorg</a>
@ -55,6 +55,7 @@ pg_reorg [OPTIONS]
<li>-h, --host=HOSTNAME : データベースサーバホスト、またはソケットディレクトリ</li> <li>-h, --host=HOSTNAME : データベースサーバホスト、またはソケットディレクトリ</li>
<li>-p, --port=PORT : データベースサーバのポート</li> <li>-p, --port=PORT : データベースサーバのポート</li>
<li>-U, --username=USERNAME : このユーザとして接続します</li> <li>-U, --username=USERNAME : このユーザとして接続します</li>
<li>-w, --no-password : パスワードの入力を促しません</li>
<li>-W, --password : パスワード入力を強制します</li> <li>-W, --password : パスワード入力を強制します</li>
</ul></li> </ul></li>
<li>一般オプション<ul> <li>一般オプション<ul>
@ -162,12 +163,22 @@ PostgreSQLに接続するためのパラメータです。
--username=USERNAME</dt> --username=USERNAME</dt>
<dd>接続するユーザ名を指定します。</dd> <dd>接続するユーザ名を指定します。</dd>
<dt>-w<br />
--no-password</dt>
<dd>
パスワードの入力を促しません。
サーバがパスワード認証を必要とし、かつ、.pgpassファイルなどの他の方法が利用できない場合、接続試行は失敗します。
バッチジョブやパスワードを入力するユーザが存在しない場合にこのオプションは有用かもしれません。
</dd>
<dt>-W<br /> <dt>-W<br />
--password</dt> --password</dt>
<dd>データベースに接続する前に、強制的にパスワード入力を促します。 <dd>データベースに接続する前に、強制的にパスワード入力を促します。</dd>
<dd>
サーバがパスワード認証を要求する場合 自動的にパスワード入力を促しますので、これが重要になることはありません。 サーバがパスワード認証を要求する場合 自動的にパスワード入力を促しますので、これが重要になることはありません。
しかし、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。 しかし、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
こうした余計な接続試行を防ぐために -W の入力が有意となる場合もあります。</dd> こうした余計な接続試行を防ぐために -W の入力が有意となる場合もあります。
</dd>
</dl> </dl>
<h3>一般オプション</h3> <h3>一般オプション</h3>

View File

@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<h1 id="pg_reorg">pg_reorg 1.1.2</h1> <h1 id="pg_reorg">pg_reorg 1.1.3</h1>
<div class="navigation"> <div class="navigation">
<a href="index.html">Top</a> &gt; <a href="index.html">Top</a> &gt;
<a href="pg_reorg.html">pg_reorg</a> <a href="pg_reorg.html">pg_reorg</a>
@ -55,6 +55,7 @@ See also "<a href="#options">Options</a>" for details.</p>
<li>-h, --host=HOSTNAME : database server host or socket directory</li> <li>-h, --host=HOSTNAME : database server host or socket directory</li>
<li>-p, --port=PORT : database server port</li> <li>-p, --port=PORT : database server port</li>
<li>-U, --username=USERNAME : user name to connect as</li> <li>-U, --username=USERNAME : user name to connect as</li>
<li>-w, --no-password : never prompt for password</li>
<li>-W, --password : force password prompt</li> <li>-W, --password : force password prompt</li>
</ul></li> </ul></li>
<li>Generic Options<ul> <li>Generic Options<ul>
@ -162,9 +163,19 @@ You cannot use --all and --dbname or --table together.
--username username</dt> --username username</dt>
<dd>User name to connect as. </dd> <dd>User name to connect as. </dd>
<dt>-W<br />--password</dt> <dt>-w<br />
<dd>Force pg_reorg to prompt for a password before connecting to a database.</dd> --no-password</dt>
<dd>This option is never essential, since pg_reorg will automatically prompt for a password if the server demands password authentication. However, vacuumdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. </dd> <dd>
Never issue a password prompt.
If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail.
This option can be useful in batch jobs and scripts where no user is present to enter a password.
</dd>
</dl>
<dt>-W<br />
--password</dt>
<dd>Force the program to prompt for a password before connecting to a database.</dd>
<dd>This option is never essential, since the program will automatically prompt for a password if the server demands password authentication. However, vacuumdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. </dd>
</dl> </dl>
<h3>Generic Options</h3> <h3>Generic Options</h3>