Re: is there a way to find out if an element is exist - Mailing list pgsql-interfaces

From Joe Conway
Subject Re: is there a way to find out if an element is exist
Date
Msg-id 42272A8E.3090102@joeconway.com
Whole thread Raw
In response to is there a way to find out if an element is exist in an array  (b t <qtboyzz@yahoo.com>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: b t
Date:
Subject: is there a way to find out if an element is exist in an array
Next
From: b t
Date:
Subject: how to parse an proargtypes array?