ALTER USER

Name

ALTER USER  --  Modifies user account information ユーザアカウント情報を変更する

Synopsis

ALTER USER username [ WITH PASSWORD password ]
    [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
    [ IN GROUP groupname [, ...] ]
    [ VALID UNTIL 'abstime' ]
  

入力

Refer to CREATE USER for a detailed description of each clause.

各句の詳細な記述についてはCREATE USER を 参照。

username

The Postgres account name of the user whose details are to be altered.

その詳細が更新される、ユーザのPostgres アカウント名

password

The new password to be used for this account.

このアカウントに用いられる新しいパスワード

groupname

The name of an access group into which this account is to be put.

このアカウントが置かれるアクセスグループの名前

abstime

The date (and, optionally, the time) at which this user's access is to be terminated.

このユーザのアクセスが終了する日付(そしてオプションで時刻)

出力

ALTER USER

Message returned if the alteration was successful.

変更が成功した場合に返るメッセージ。

ERROR: alterUser: user "username" does not exist

Error message returned if the specified user is not known to the database.

指定のユーザがデータベースに認知されていない場合に返る メッセージ

説明

ALTER USER is used to change the attributes of a user's Postgres account. Please note that it is not possible to alter a user's "usesysid" via the alter user statement. Also, it is only possible for the Postgres user or any user with read and modify permissions on pg_shadow to alter user passwords.

ALTER USER はユーザの Postgres アカウントの属性を変更する のに使われます。 alter user 文ではユーザの"usesysid" を変更することはできない ことに注意して下さい。 また、Postgres ユーザや、 pg_shadow を読んだり変更したりできる権限のある ユーザ以外は、ユーザのパスワードを変更することができません。

If any of the clauses of the alter user statement are omitted, the corresponding value in the "pg_shadow" table is left unchanged.

alter user 文における各句のいずれかが省略された場合、 "pg_shadow" 表において対応する値は変更されません。

注意事項

ALTER USER is a Postgres language extension.

ALTER USER は、Postgres の言語拡張です。

Refer to CREATE/DROP USER to create or remove a user account.

ユーザアカウントを作成、削除するには CREATE/DROP USER を参照。

In the current release (v6.5), the IN GROUP clause is parsed but has no affect. When it is fully implemented, it is intended to modify the pg_group relation.

現在のリリース(v6.5) では、IN GROUP 句は構文解析されますが 何の効力もありません。フル実装したあかつきには、その句 によってpg_group リレーションが更新される様になります。

使用法

Change a user password:

ユーザのパスワードを変更する:

ALTER USER davide WITH PASSWORD hu8jmn3;
  
Change a user's valid until date ユーザの有効期限を変更する:
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
   
Change a user's valid until date, specifying that his authorisation should expire at midday on 4th May 1998 using the time zone which is one hour ahead of UTC ユーザの有効期限を、1時間進んだUTC タイムゾーンを用いて 1998年5月4日の正午に破棄するような指定で ユーザの有効期限を変更する:
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
   
Give a user the ability to create other users and new databases. ユーザに他のユーザと新しいデータベースを作成する権限を与える:
ALTER USER miriam CREATEUSER CREATEDB;
   
Place a user in two groups ユーザを2 つのグループに位置付ける:
ALTER USER miriam IN GROUP sales, payroll;
   

互換性

SQL92

There is no ALTER USER statement in SQL92. The standard leaves the definition of users to the implementation.

SQL92 にはALTER USER 文はありません。 規格はユーザの定義を実装依存にしています。