From: Bas Scheffers <bas@scheffers.net>
To: pgsql-general@postgresql.org
Cc: alex@toomuchspace.com
Subject: Re: Help with a query
Date: Fri, 27 Feb 2004 10:32:26 -0000 (GMT)
Message-ID: <4016.217.205.40.94.1077877946.squirrel@io.scheffers.net> (raw)
If the user/groups you are talking about are postgres users and groups,
this is it:
select * from pg_catalog.pg_group where (select usesysid from
pg_catalog.pg_user where usename = 'user') = any(grolist)
The place to find this kind of thing is the Postgres Internals section
(system catalogs) that desribes the system tables. "any" is an array
function which is needed as the users that belong to a group are an array
of INT user ids.
Hope that helps,
Bas.
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-general@postgresql.org
Cc: bas@scheffers.net, alex@toomuchspace.com
Subject: Re: Help with a query
In-Reply-To: <4016.217.205.40.94.1077877946.squirrel@io.scheffers.net>
References: <4016.217.205.40.94.1077877946.squirrel@io.scheffers.net>
* 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