August 20th, 2009, 04:38 AM
I am using PostgreSQL 8.1 . I am trying to print all the roles in a hierarchy. For example
Here r5 is member of r4 , r4 is member of r2 and r3 and r2 is member of r1. Now in a query if i give role name as 'r5' it has to display the entire hierarchy. For this I am trying with the following query but it just printing the immediate hierarchy only.
The query is as following :
select pr.rolname from pg_roles pr
LEFT JOIN pg_auth_members pam
LEFT JOIN pg_roles pr1
I need a solution for this problem.
September 20th, 2012, 01:23 PM
Hi Prakash, did you ever find the solution for that ?
I'm having the same problem to solve, so I'd be interested to know the answer.
Originally Posted by prakashgula