alter_group 中文man頁(yè)面
NAME
ALTER GROUP - 修改一個(gè)用戶組
SYNOPSIS
ALTER GROUP groupname ADD USER username [, ... ] ALTER GROUP groupname DROP USER username [, ... ] ALTER GROUP groupname RENAME TO newname
DESCRIPTION 描述
ALTER GROUP 用于修改一個(gè)用戶組。 頭兩個(gè)形式從組中增加或者刪除用戶。 只有數(shù)據(jù)庫(kù)超級(jí)用戶才能使用這條命令。向組中增加用戶并不創(chuàng)建用戶。 同樣從組中刪除用戶也不刪除用戶本身。
第三種變體修改一個(gè)組的名字。只有數(shù)據(jù)庫(kù)超級(jí)用戶可以重命名組。
PARAMETERS 參數(shù)
- groupname
要更改的組名稱(chēng)。- username
準(zhǔn)備向組中增加或從組中刪除的用戶名。用戶名必須已經(jīng)存在。- newname
組的新名字。
EXAMPLES 例子
向組中增加用戶:
ALTER GROUP staff ADD USER karl, john;
從組中刪除用戶:
ALTER GROUP workers DROP USER beth;
COMPATIBILITY 兼容性
SQL 標(biāo)準(zhǔn)里沒(méi)有 ALTER GROUP 語(yǔ)句。角色(roles)的概念與之類(lèi)似。
SEE ALSO 參見(jiàn)
CREATE GROUP [create_group(7)], DROP GROUP [drop_group(l)]
#p#
NAME
ALTER GROUP - change a user group
SYNOPSIS
ALTER GROUP groupname ADD USER username [, ... ] ALTER GROUP groupname DROP USER username [, ... ] ALTER GROUP groupname RENAME TO newname
DESCRIPTION
ALTER GROUP is used to change a user group. The first two variants add or remove users from a group. Only database superusers can use this command. Adding a user to a group does not create the user. Similarly, removing a user from a group does not drop the user itself.
The third variant changes the name of the group. Only a database superuser can rename groups.
PARAMETERS
- groupname
- The name of the group to modify.
- username
- Users which are to be added or removed from the group. The users must exist.
- newname
- The new name of the group.
EXAMPLES
Add users to a group:
ALTER GROUP staff ADD USER karl, john;
Remove a user from a group:
ALTER GROUP workers DROP USER beth;
COMPATIBILITY
There is no ALTER GROUP statement in the SQL standard. The concept of roles is similar.
SEE ALSO
CREATE GROUP [create_group(7)], DROP GROUP [drop_group(l)]