ALTER ROLE
Synopsis
Use the ALTER ROLE
statement to change the properties of an existing role.
It allows modifying properties SUPERUSER
, PASSWORD
, and LOGIN
.
This statement is enabled by setting the YB-TServer flag --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
ycqlsh:example> CREATE ROLE finance;
ycqlsh:example> ALTER ROLE finance with LOGIN = true;
ycqlsh:example> ALTER ROLE finance with SUPERUSER = true;
ycqlsh:example> ALTER ROLE finance with PASSWORD = 'jsfp9ajhufans2' AND SUPERUSER = false;