DROP ROLE
Removes an existing role. Enclose role names with special characters and capitalization in single quotation marks.
Restriction: The role used to drop roles must have DROP
permission, directly on the selected role or on ALL ROLES
.
Only superuser roles can drop another superuser role.
A role can never drop their own role.
Synopsis
DROP ROLE [ IF EXISTS ] <role_name> ;
Syntax legend
Syntax conventions | Description |
---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
Set, list, map, or tuple.
Angle brackets ( |
|
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
Examples
Drop the team manager role.
DROP ROLE IF EXISTS team_manager;