DESCRIBE CONNECT PERMISSIONS¶
The DESCRIBE CONNECT PERMISSIONS
statement lists all roles and their database connection privileges.
Note
DESCRIBE
commands use CPU to increase usability.
Syntax¶
DESC[RIBE] CONNECT PERMISSIONS [DATABASE <database_name>] [ROLE ID IN (<role_id> [,...])] [PERMISSION ID IN (<permission_id> [,...])]
Parameters¶
Parameter |
Parameter Type |
Description |
---|---|---|
|
Filters by a specific database |
|
|
Filters by one or more role IDs |
|
|
Filters by one or more permission IDs |
Output¶
Parameter |
Data Type |
Description |
---|---|---|
|
|
The ID of a specific role |
|
|
The name of a specific role |
|
|
Database name |
|
|
The specific permission’s ID |
|
|
Identifies whether or not a role has |
|
|
Identifies whether or not a role is a |
Examples¶
DESCRIBE CONNECT PERMISSIONS;
role_id|role_name |database_name|permission_id|superuser|clusteradmin|
-------+-----------------------+-------------+-------------+---------+------------+
1 |sqream |master |1002 |1 |0 |
1 |sqream |master |1003 |1 |0 |
2 |someone@blue.com |master |1003 |1 |1 |
4 |anothersomeone@blue.com|master |1003 |1 |0 |
6 |triceratop@blue.com |master |1003 |1 |1 |
8 |tyrannosaurus@blue.com |master |1003 |1 |1 |
Using optional parameters¶
DESCRIBE CONNECT PERMISSIONS DATABASE products ROLE ID in (1,2,3) PERMISSION ID in (1002,1003);
role_id|role_name |database_name|permission_id|superuser|clusteradmin|
-------+-----------------+-------------+-------------+---------+------------+
2 |someone@blue.com |products |1003 |1 |1 |
Permissions¶
This command requires SUPERUSER
permission, except when a role queries its own permissions.