Manage roles

This page outlines how to create and manage roles in Materialize.

Create a role

To create a new role, use the CREATE ROLE statement:

CREATE ROLE <role_name> WITH <role_attribute>;

Materialize roles have the following available attributes:

Name Description
INHERIT Read-only. Can inherit privileges of other roles.

Alter a role’s attributes

To change a role’s attributes, use the ALTER ROLE statement:


Grant a role to a user

To grant a role assignment to a user, use the GRANT statement:

GRANT <role_name> to <user_name>;

Remove a user from a role

To remove a user from a role, use the REVOKE statement:

REVOKE <role_name> FROM <user_name>;

Drop a role

To remove a role, use the DROP ROLE statement:

DROP ROLE <role_name>;
Back to top ↑