-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-dropuser.html
More file actions
200 lines (198 loc) · 17.5 KB
/
app-dropuser.html
File metadata and controls
200 lines (198 loc) · 17.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>dropuser</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="app-dropdb.html" title="dropdb" /><link rel="next" href="app-ecpg.html" title="ecpg" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body id="docContent" class="container-fluid col-10"><div class="other_version"><a href="https://www.postgresql.jp/document/">バージョンごとのドキュメント一覧</a></div><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 18.3文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="reference-client.html" title="PostgreSQLクライアントアプリケーション">PostgreSQLクライアントアプリケーション</a></td><td width="20%" align="right"><div class="actions"><a class="issue" title="github" href="https://github.com/pgsql-jp/jpug-doc/issues/new?template=bug_report.yml&what-happened=version 18.3 : app-dropuser.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="app-dropdb.html" title="dropdb">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="reference-client.html" title="PostgreSQLクライアントアプリケーション">上へ</a></td><td width="60%" align="center"><span class="application">dropuser</span></td><td width="20%" align="right"> <a accesskey="n" href="app-ecpg.html" title="ecpg">次へ</a></td></tr></table><hr /></div><div class="refentry" id="APP-DROPUSER"><div class="titlepage"></div><a id="id-1.9.4.7.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle"><span class="application">dropuser</span></span></h2><p>dropuser<span class="original">
<refpurpose>remove a <productname>PostgreSQL</productname> user account</refpurpose>
</span> — <span class="productname">PostgreSQL</span>のユーザアカウントを削除する</p></div><div class="refsynopsisdiv"><h2>概要</h2><div class="cmdsynopsis"><p id="id-1.9.4.7.4.1"><code class="command">dropuser</code> [<em class="replaceable"><code>connection-option</code></em>...] [<em class="replaceable"><code>option</code></em>...] [<em class="replaceable"><code>username</code></em>]</p></div></div><div class="refsect1" id="id-1.9.4.7.5"><h2>説明</h2><span class="original">
<title>Description</title>
</span><p>
<span class="original">
<application>dropuser</application> removes an existing
<productname>PostgreSQL</productname> user.
Superusers can use this command to remove any role; otherwise, only
non-superuser roles can be removed, and only by a user who possesses
the <literal>CREATEROLE</literal> privilege and has been granted
<literal>ADMIN OPTION</literal> on the target role.
</span>
<span class="application">dropuser</span>は、既存の<span class="productname">PostgreSQL</span>のユーザを削除します。
スーパーユーザはこのコマンドを使ってあらゆるロールを削除できます。それ以外の場合は、スーパーユーザ以外のロールのみが、<code class="literal">CREATEROLE</code>権限を持ち、対象のロールに対して<code class="literal">ADMIN OPTION</code>を付与されているユーザによってのみ削除されます。
</p><p>
<span class="original">
<application>dropuser</application> is a wrapper around the
<acronym>SQL</acronym> command <link linkend="sql-droprole"><command>DROP ROLE</command></link>.
There is no effective difference between dropping users via
this utility and via other methods for accessing the server.
</span>
<span class="application">dropuser</span>は<acronym class="acronym">SQL</acronym>コマンド<a class="link" href="sql-droprole.html" title="DROP ROLE"><code class="command">DROP ROLE</code></a>のラッパーです。
このユーティリティを使用してユーザを削除しても、この方法以外の方法でサーバでアクセスしてユーザを削除しても特に違いはありません。
</p></div><div class="refsect1" id="id-1.9.4.7.6"><h2>オプション</h2><span class="original">
<title>Options</title>
</span><p>
<span class="original">
<application>dropuser</application> accepts the following command-line arguments:
</span>
<span class="application">dropuser</span>は、下記のコマンドライン引数を受け付けます。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>username</code></em></span></dt><dd><p>
<span class="original">
Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
You will be prompted for a name if none is specified on the command
line and the <option>-i</option>/<option>&#45;-interactive</option> option
is used.
</span>
削除する<span class="productname">PostgreSQL</span>のユーザ名を指定します。
コマンドラインで指定されず、かつ<code class="option">-i</code>/<code class="option">--interactive</code>オプションが使用されている場合は、入力を促すプロンプトが表示されます。
</p></dd><dt><span class="term"><code class="option">-e</code><br /></span><span class="term"><code class="option">--echo</code></span></dt><dd><p>
<span class="original">
Echo the commands that <application>dropuser</application> generates
and sends to the server.
</span>
<span class="application">dropuser</span>が生成し、サーバに送信するコマンドを表示します。
</p></dd><dt><span class="term"><code class="option">-i</code><br /></span><span class="term"><code class="option">--interactive</code></span></dt><dd><p>
<span class="original">
Prompt for confirmation before actually removing the user, and prompt
for the user name if none is specified on the command line.
</span>
実際にユーザを削除する前に確認のプロンプトを表示します。
コマンドラインにてユーザ名が指定されなかった場合にユーザ名の入力を促します。
</p></dd><dt><span class="term"><code class="option">-V</code><br /></span><span class="term"><code class="option">--version</code></span></dt><dd><p>
<span class="original">
Print the <application>dropuser</application> version and exit.
</span>
<span class="application">dropuser</span>のバージョンを表示し、終了します。
</p></dd><dt><span class="term"><code class="option">--if-exists</code></span></dt><dd><p>
<span class="original">
Do not throw an error if the user does not exist. A notice is
issued in this case.
</span>
ユーザが存在しない場合にエラーを発生しません。
この場合は注意が発生します。
</p></dd><dt><span class="term"><code class="option">-?</code><br /></span><span class="term"><code class="option">--help</code></span></dt><dd><p>
<span class="original">
Show help about <application>dropuser</application> command line
arguments, and exit.
</span>
<span class="application">dropuser</span>のコマンドライン引数の使用方法を表示し、終了します。
</p></dd></dl></div><p>
</p><p>
<span class="original">
<application>dropuser</application> also accepts the following
command-line arguments for connection parameters:
</span>
<span class="application">dropuser</span>は以下のコマンドライン引数も接続パラメータとして受け付けます。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h <em class="replaceable"><code>host</code></em></code><br /></span><span class="term"><code class="option">--host=<em class="replaceable"><code>host</code></em></code></span></dt><dd><p>
<span class="original">
Specifies the host name of the machine on which the
server
is running. If the value begins with a slash, it is used
as the directory for the Unix domain socket.
</span>
サーバが稼働しているマシンのホスト名を指定します。
この値がスラッシュから始まる場合、Unixドメインソケット用のディレクトリとして使用されます。
</p></dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>port</code></em></code><br /></span><span class="term"><code class="option">--port=<em class="replaceable"><code>port</code></em></code></span></dt><dd><p>
<span class="original">
Specifies the TCP port or local Unix domain socket file
extension on which the server
is listening for connections.
</span>
サーバが接続を監視するTCPポートもしくはUnixドメインソケットのファイル拡張子を指定します。
</p></dd><dt><span class="term"><code class="option">-U <em class="replaceable"><code>username</code></em></code><br /></span><span class="term"><code class="option">--username=<em class="replaceable"><code>username</code></em></code></span></dt><dd><p>
<span class="original">
User name to connect as (not the user name to drop).
</span>
接続に使用するユーザ名です
(削除するユーザ名ではありません)。
</p></dd><dt><span class="term"><code class="option">-w</code><br /></span><span class="term"><code class="option">--no-password</code></span></dt><dd><p>
<span class="original">
Never issue a password prompt. If the server requires
password authentication and a password is not available by
other means such as a <filename>.pgpass</filename> 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.
</span>
パスワードの入力を促しません。
サーバがパスワード認証を必要とし、かつ、<code class="filename">.pgpass</code>ファイルなどの他の方法が利用できない場合、接続試行は失敗します。
バッチジョブやスクリプトなどパスワードを入力するユーザが存在しない場合にこのオプションは有用かもしれません。
</p></dd><dt><span class="term"><code class="option">-W</code><br /></span><span class="term"><code class="option">--password</code></span></dt><dd><p>
<span class="original">
Force <application>dropuser</application> to prompt for a
password before connecting to a database.
</span>
データベースに接続する前に、<span class="application">dropuser</span>は強制的にパスワード入力を促します。
</p><p>
<span class="original">
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</option> to avoid the extra
connection attempt.
</span>
サーバがパスワード認証を要求する場合<span class="application">dropuser</span>は自動的にパスワード入力を促しますので、これが重要になることはありません。
しかし、<span class="application">dropuser</span>は、サーバにパスワードが必要かどうかを判断するための接続試行を無駄に行います。
こうした余計な接続試行を防ぐために<code class="option">-W</code>の入力が有意となる場合もあります。
</p></dd></dl></div><p>
</p></div><div class="refsect1" id="id-1.9.4.7.7"><h2>環境</h2><span class="original">
<title>Environment</title>
</span><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">PGHOST</code><br /></span><span class="term"><code class="envar">PGPORT</code><br /></span><span class="term"><code class="envar">PGUSER</code></span></dt><dd><p>
<span class="original">
Default connection parameters
</span>
デフォルトの接続パラメータです。
</p></dd><dt><span class="term"><code class="envar">PG_COLOR</code></span></dt><dd><p>
<span class="original">
Specifies whether to use color in diagnostic messages. Possible values
are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</span>
診断メッセージで色を使うかどうかを指定します。
指定可能な値は<code class="literal">always</code>、<code class="literal">auto</code>、<code class="literal">never</code>です。
</p></dd></dl></div><p>
<span class="original">
This utility, like most other <productname>PostgreSQL</productname> utilities,
also uses the environment variables supported by <application>libpq</application>
(see <xref linkend="libpq-envars"/>).
</span>
このユーティリティは、他のほとんどの<span class="productname">PostgreSQL</span>ユーティリティと同様、<span class="application">libpq</span>がサポートする環境変数(<a class="xref" href="libpq-envars.html" title="32.15. 環境変数">32.15</a>参照)も使います。
</p></div><div class="refsect1" id="id-1.9.4.7.8"><h2>診断</h2><span class="original">
<title>Diagnostics</title>
</span><p>
<span class="original">
In case of difficulty, see <xref linkend="sql-droprole"/>
and <xref linkend="app-psql"/> for
discussions of potential problems and error messages.
The database server must be running at the
targeted host. Also, any default connection settings and environment
variables used by the <application>libpq</application> front-end
library will apply.
</span>
問題が発生した場合、考えられる原因とエラーメッセージについては<a class="xref" href="sql-droprole.html" title="DROP ROLE"><span class="refentrytitle">DROP ROLE</span></a>と<a class="xref" href="app-psql.html" title="psql"><span class="refentrytitle"><span class="application">psql</span></span></a>を参照してください。
データベースサーバは対象ホスト上で稼働していなければなりません。
また、<span class="application">libpq</span>フロントエンドライブラリで使用される、あらゆるデフォルトの設定や環境変数が適用されます。
</p></div><div class="refsect1" id="id-1.9.4.7.9"><h2>例</h2><span class="original">
<title>Examples</title>
</span><p>
<span class="original">
To remove user <literal>joe</literal> from the default database
server:
</span>
デフォルトのデータベースサーバから、ユーザ<code class="literal">joe</code>を削除します。
</p><pre class="screen">
<code class="prompt">$ </code><strong class="userinput"><code>dropuser joe</code></strong>
</pre><p>
</p><p>
<span class="original">
To remove user <literal>joe</literal> using the server on host
<literal>eden</literal>, port 5000, with verification and a peek at the underlying
command:
</span>
ホスト<code class="literal">eden</code>でポート5000を使用しているサーバから、ユーザ<code class="literal">joe</code>を削除します。
このとき、背後で実行されるコマンドの表示と、削除前の確認をします。
</p><pre class="screen">
<code class="prompt">$ </code><strong class="userinput"><code>dropuser -p 5000 -h eden -i -e joe</code></strong>
<code class="computeroutput">Role "joe" will be permanently removed.
Are you sure? (y/n) </code><strong class="userinput"><code>y</code></strong>
<code class="computeroutput">DROP ROLE joe;</code>
</pre></div><div class="refsect1" id="id-1.9.4.7.10"><h2>関連項目</h2><span class="original">
<title>See Also</title>
</span><span class="simplelist"><a class="xref" href="app-createuser.html" title="createuser"><span class="refentrytitle"><span class="application">createuser</span></span></a>, <a class="xref" href="sql-droprole.html" title="DROP ROLE"><span class="refentrytitle">DROP ROLE</span></a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="app-dropdb.html" title="dropdb">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-client.html" title="PostgreSQLクライアントアプリケーション">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="app-ecpg.html" title="ecpg">次へ</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="application">dropdb</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.3文書">ホーム</a></td><td width="40%" align="right" valign="top"> <span class="application">ecpg</span></td></tr></table></div></body></html>