Hi,
what about this:
SELECT p.rolname, m.rolname as member, g.rolname as grantor
FROM pg_authid p
INNER JOIN pg_auth_members am ON (p.oid = am.roleid)
INNER JOIN pg_authid m ON (am.member = m.oid)
INNER JOIN pg_authid g ON (am.grantor = g.oid)
You can use proper WHERE to filter results.
I want to check the role has been granted to which role. In my working
environment, the all the normal is assigned to role group. when i issue dp,
it only give me the role group privilege. So I need to check which user is
in which user group. THe following is my sql to do that. Is there anybody