Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

DROP GROUP

Deletes a user group. This command is not reversible. This command does not delete the individual users in a group.

See DROP USER to delete an individual user.

Syntax

Copy
DROP GROUP name

Parameter

name

Name of the user group to delete.

Example

The following example deletes the GUEST user group:

Copy
drop group guests;

You cannot drop a group if the group has any privileges on an object. If you attempt to drop such a group, you will receive the following error.

Copy
ERROR: group "guest" cannot be dropped because the group has a privilege on some object

If the group has privileges for an object, first revoke the privileges before dropping the group. The following example revokes all privileges on all tables in the public schema from the GUEST user group, and then drops the group.

Copy
revoke all on all tables in schema public from group guest; drop group guests;

On this page: