This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script to find a list of Roles with its associated member information in Greenplum.
Greenplum provides workload management using the concept of Resource Queues so for that DBA should know about Roles and their members.
Using below script, you can get the information of Greenplum Roles and its members/users information.
t.rarolename as RoleName
,t.ramembername as RoleMember
from pg_roles pr,
select gra.rarolename, gra.ramembername
from pg_roles spr,
where gra.rarolename = spr.rolname
and spr.rolcanlogin = 'f'
) as t
where pr.rolcanlogin = 'f'
and pr.rolname = t.rarolename
order by t.rarolename, t.ramembername;