REVOKE (Role)

Revokes a role from users and roles.

Syntax

REVOKE [ ADMIN OPTION FOR ] role[,…]
   FROM grantee[,…]
   [ CASCADE ]

Parameters

ADMIN OPTION FOR

Revokes the privilege of assigning the specified roles to other users or roles. Current roles for grantees remain unaffected. If you omit this clause, Vertica revokes role assignment privileges and the current roles .

Revokes the access for the specified users or roles user or role's administration access to the role, and not the role itself.

role

Role to revoke.

grantee

Specifies whose privileges are revoked, one of the following:

CASCADE

If the target grantees have a grant option to extend the specified privileges to other users, CASCADE specifies to search for these users and revoke the privileges from them also.

Privileges

One of the following:

Examples

This example shows the revocation of the pseudosuperuser role from the dbadmin user:

=> REVOKE pseudosuperuser from dbadmin;

This example shows the revocation of administration access from the dbadmin user for the pseudosuperuser role. The ADMIN OPTION command does not remove the pseudosuperuser role.

=> REVOKE ADMIN OPTION FOR pseudosuperuser FROM dbadmin;

Notes

If the role you are trying to revoke was not already granted to the user, Vertica returns a NOTICE:

=> REVOKE commentor FROM Sue;
NOTICE 2022:  Role "commentor" was not already granted to user "Sue"
REVOKE ROLE