Getting the list of users belonging to a group in Redshift seems to be a fairly common task but I don't know how to interpret BLOB in grolist field.
I am literally getting "BLOB" in grolist field from TeamSQL. Not so sure this is specific to TeamSQL but I kind of remember thatI got a list of IDs there instead previously in other tool
You can retrieve data about Amazon Redshift database users with the SVL_USER_INFO view.
Using groups as roles in Redshift: To view assigned roles to users in your Redshift cluster, you can use the following command: SELECT usename AS user_name, groname AS group_name FROM pg_user, pg_group WHERE pg_user. usesysid = ANY(pg_group.
The user name rdsdb is used internally by Amazon Redshift to perform routine administrative and maintenance tasks. You can filter your query to show only user-defined user names by adding where usesysid > 1 to your SELECT statement.
To view the permissions of a specific user on a specific schema, simply change the bold user name and schema name to the user and schema of interest on the following code. For a full list of every user - schema permission status, simply delete the entire WHERE clause. SELECT u. usename, s.
This worked for me:
select usename from pg_user , pg_group where pg_user.usesysid = ANY(pg_group.grolist) and pg_group.groname='<YOUR_GROUP_NAME>';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With