ALTER ROLE
Attention
This page documents an earlier version. Go to the latest (v2.3) version.Synopsis
The ALTER ROLE
statement changes the properties of an existing role.
It allows modifying properties SUPERUSER
, PASSWORD
, and LOGIN
.
This statment is enabled by setting the yb-tserver gflag use_cassandra_authentication
to true
.
Syntax
Diagram
Grammar
alter_table ::= ALTER ROLE role_name WITH role_property [ AND role_property ...];
role_property ::= PASSWORD = '<Text Literal>'
| LOGIN = <Boolean Literal>'
| SUPERUSER = '<Boolean Literal>'
Where
role_name
is a text identifier.
Semantics
- An error is raised if
role_name
does not exist.
Examples
You can do this as shown below.
cqlsh:example> CREATE ROLE finance;
cqlsh:example> ALTER ROLE finance with LOGIN = true;
cqlsh:example> ALTER ROLE finance with SUPERUSER = true;
cqlsh:example> ALTER ROLE finance with PASSWORD = 'jsfp9ajhufans2' AND SUPERUSER = false;
See also
CREATE ROLE
DROP ROLE
GRANT ROLE
REVOKE ROLE
GRANT PERMISSION
REVOKE PERMISSION
Other CQL Statements