Skip to content

Commit d490a1b

Browse files
committed
Fix -w and -W options. They were inverted.
1 parent 67a5d7b commit d490a1b

File tree

5 files changed

+33
-11
lines changed

5 files changed

+33
-11
lines changed

SPECS/pg_reorg.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

bin/pg_reorg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @brief Client Modules
99
*/
1010

11-
const char *PROGRAM_VERSION = "1.1.2";
11+
const char *PROGRAM_VERSION = "1.1.3";
1212
const char *PROGRAM_URL = "http://reorg.projects.postgresql.org/";
1313
const char *PROGRAM_EMAIL = "reorg-general@lists.pgfoundry.org";
1414

bin/pgut/pgut-fe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ static pgut_option default_options[] =
475475
{ 's', 'h', "host" , &host },
476476
{ 's', 'p', "port" , &port },
477477
{ 's', 'U', "username" , &username },
478-
{ 'y', 'w', "no-password" , &prompt_password },
479-
{ 'Y', 'W', "password" , &prompt_password },
478+
{ 'Y', 'w', "no-password" , &prompt_password },
479+
{ 'y', 'W', "password" , &prompt_password },
480480
{ 0 }
481481
};
482482

doc/pg_reorg-ja.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99

1010
<body>
11-
<h1 id="pg_reorg">pg_reorg 1.1.2</h1>
11+
<h1 id="pg_reorg">pg_reorg 1.1.3</h1>
1212
<div class="navigation">
1313
<a href="index-ja.html">Top</a> &gt;
1414
<a href="pg_reorg-ja.html">pg_reorg</a>
@@ -55,6 +55,7 @@ <h2 id="synopsis">概要</h2>
5555
<li>-h, --host=HOSTNAME : データベースサーバホスト、またはソケットディレクトリ</li>
5656
<li>-p, --port=PORT : データベースサーバのポート</li>
5757
<li>-U, --username=USERNAME : このユーザとして接続します</li>
58+
<li>-w, --no-password : パスワードの入力を促しません</li>
5859
<li>-W, --password : パスワード入力を強制します</li>
5960
</ul></li>
6061
<li>一般オプション<ul>
@@ -162,12 +163,22 @@ <h3>接続オプション</h3>
162163
--username=USERNAME</dt>
163164
<dd>接続するユーザ名を指定します。</dd>
164165

166+
<dt>-w<br />
167+
--no-password</dt>
168+
<dd>
169+
パスワードの入力を促しません。
170+
サーバがパスワード認証を必要とし、かつ、.pgpassファイルなどの他の方法が利用できない場合、接続試行は失敗します。
171+
バッチジョブやパスワードを入力するユーザが存在しない場合にこのオプションは有用かもしれません。
172+
</dd>
173+
165174
<dt>-W<br />
166175
--password</dt>
167-
<dd>データベースに接続する前に、強制的にパスワード入力を促します。
176+
<dd>データベースに接続する前に、強制的にパスワード入力を促します。</dd>
177+
<dd>
168178
サーバがパスワード認証を要求する場合 自動的にパスワード入力を促しますので、これが重要になることはありません。
169179
しかし、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
170-
こうした余計な接続試行を防ぐために -W の入力が有意となる場合もあります。</dd>
180+
こうした余計な接続試行を防ぐために -W の入力が有意となる場合もあります。
181+
</dd>
171182
</dl>
172183

173184
<h3>一般オプション</h3>

doc/pg_reorg.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99

1010
<body>
11-
<h1 id="pg_reorg">pg_reorg 1.1.2</h1>
11+
<h1 id="pg_reorg">pg_reorg 1.1.3</h1>
1212
<div class="navigation">
1313
<a href="index.html">Top</a> &gt;
1414
<a href="pg_reorg.html">pg_reorg</a>
@@ -55,6 +55,7 @@ <h2 id="synopsis">Synopsis</h2>
5555
<li>-h, --host=HOSTNAME : database server host or socket directory</li>
5656
<li>-p, --port=PORT : database server port</li>
5757
<li>-U, --username=USERNAME : user name to connect as</li>
58+
<li>-w, --no-password : never prompt for password</li>
5859
<li>-W, --password : force password prompt</li>
5960
</ul></li>
6061
<li>Generic Options<ul>
@@ -162,9 +163,19 @@ <h3>Connection Options</h3>
162163
--username username</dt>
163164
<dd>User name to connect as. </dd>
164165

165-
<dt>-W<br />--password</dt>
166-
<dd>Force pg_reorg to prompt for a password before connecting to a database.</dd>
167-
<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>
166+
<dt>-w<br />
167+
--no-password</dt>
168+
<dd>
169+
Never issue a password prompt.
170+
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.
171+
This option can be useful in batch jobs and scripts where no user is present to enter a password.
172+
</dd>
173+
</dl>
174+
175+
<dt>-W<br />
176+
--password</dt>
177+
<dd>Force the program to prompt for a password before connecting to a database.</dd>
178+
<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>
168179
</dl>
169180

170181
<h3>Generic Options</h3>

0 commit comments

Comments
 (0)