Thread: find out all users under specific user

find out all users under specific user

From
"ashok@kalculate.com"
Date:
Hi List,

I want to find out all the users under a specific user.
postgres is a superuser of postgresql,
under in postres user i made one user ABC and
under this ABC user i made XYZ,MNO,IJK users.

Now i want to find out all the users, which r exist
under in ABC user so what is the query for it?

plz. help me.
Thanks

Ashok



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



Re: find out all users under specific user

From
"Ben K."
Date:
> I want to find out all the users under a specific user.
> postgres is a superuser of postgresql,
> under in postres user i made one user ABC and
> under this ABC user i made XYZ,MNO,IJK users.
>
> Now i want to find out all the users, which r exist
> under in ABC user so what is the query for it?

select relname, array_to_string(relacl,',') as acl from pg_class
where array_to_string(relacl,',') ~ '/ABC[,$]';


HTH

Ben K.
Developer
http://benix.tamu.edu