From: Joe Conway <mail@joeconway.com>
To: b t <qtboyzz@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: is there a way to find out if an element is exist
Date: Thu, 03 Mar 2005 07:17:34 -0800
Message-ID: <42272A8E.3090102@joeconway.com> (raw)
In-Reply-To: <20050303101629.76782.qmail@web61007.mail.yahoo.com>
References: <20050303101629.76782.qmail@web61007.mail.yahoo.com>
b t wrote:
> As part of my project, we have to build a tool similar to phppgadmin,
> I want to find out if a particular is in what group, I used "select
> grolist from pg_group where groname = 'webmaster';" it returned an
> array of user in group "webmaster" I want to find out if a particular
> user is in that array. Thanks in advance
Something like this? (in Postgres 8.0.x)
select usename from pg_user, pg_group
where usesysid = any (grolist) and groname = 'webmaster';
HTH,
Joe
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: mail@joeconway.com, qtboyzz@yahoo.com
Subject: Re: is there a way to find out if an element is exist
In-Reply-To: <42272A8E.3090102@joeconway.com>
* 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