ALTER ROLE

ALTER ROLE alters the attributes of an existing role.

Syntax

ALTER ROLE role_name WITH INHERIT
Field Use
role_name A name for the role.
INHERIT Grants the role the ability to inheritance of privileges of other roles.

Details

Unlike PostgreSQL, materialize derives the LOGIN and SUPERUSER attributes for a role during authentication, every time that role tries to connect to Materialize. Therefore, you cannot specify either attribute when altering an existing role.

Unlike PostgreSQL, materialize does not currently support the NOINHERIT attribute and the SET ROLE command.

You may not specify redundant or conflicting sets of options. For example, Materialize will reject the statement ALTER ROLE ... INHERIT INHERIT.

Unlike PostgreSQL, Materialize does not use role attributes to determine a roles ability to create top level objects such as databases and other roles. Instead, Materialize uses system level privileges. See GRANT PRIVILEGE for more details.

When RBAC is enabled a role must have the CREATEROLE system privilege to alter another role.

Examples

ALTER ROLE rj INHERIT;
SELECT name, inherit FROM mz_roles WHERE name = 'rj';
rj  true

Privileges

The privileges required to execute this statement are:

  • CREATEROLE privileges on the system.
Back to top ↑