Re: find out all users under specific user

From: "Ben K(dot)" <bkim(at)coe(dot)tamu(dot)edu>
To: "ashok(at)kalculate(dot)com" <ashok(at)kalculate(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: find out all users under specific user
Date: 2006-05-20 16:02:59
Message-ID: Pine.GSO.4.64.0605201059080.3823@coe.tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2006-05-21 21:16:15 Re: does wal archiving block the current client connection?
Previous Message Ben K. 2006-05-20 15:54:29 Re: lock a database from new connections, without modifying