From: Ben K. <bkim@coe.tamu.edu>
To: ashok@kalculate.com <ashok@kalculate.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: find out all users under specific user
Date: Sat, 20 May 2006 11:02:59 -0500 (CDT)
Message-ID: <Pine.GSO.4.64.0605201059080.3823@coe.tamu.edu> (raw)
In-Reply-To: <380-22006541817540109@M2W005.mail2web.com>
References: <380-22006541817540109@M2W005.mail2web.com>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bkim@coe.tamu.edu, ashok@kalculate.com
Subject: Re: find out all users under specific user
In-Reply-To: <Pine.GSO.4.64.0605201059080.3823@coe.tamu.edu>
References: <380-22006541817540109@M2W005.mail2web.com> <Pine.GSO.4.64.0605201059080.3823@coe.tamu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox