ALTER GROUP
Changes a user group. Use this command to add users to the group, drop users from the group, or rename the group.
Syntax
ALTER GROUP group_name { ADD USER username [, ... ] | DROP USER username [, ... ] | RENAME TO new_name }
Parameters
- group_name
-
Name of the user group to modify.
- ADD
-
Adds a user to a user group.
- DROP
-
Removes a user from a user group.
- username
-
Name of the user to add to the group or drop from the group.
- RENAME TO
-
Renames the user group. Group names beginning with two underscores are reserved for Amazon Redshift internal use. For more information about valid names, see Names and identifiers.
- new_name
-
New name of the user group.
Examples
The following example adds a user named DWUSER to the ADMIN_GROUP group.
ALTER GROUP admin_group ADD USER dwuser;
The following example renames the group ADMIN_GROUP to ADMINISTRATORS.
ALTER GROUP admin_group RENAME TO administrators;
The following example adds two users to the group ADMIN_GROUP.
ALTER GROUP admin_group ADD USER u1, u2;
The following example drops two users from the group ADMIN_GROUP.
ALTER GROUP admin_group DROP USER u1, u2;