pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedis there a way to find out if an element is exist in an array
2+ messages / 2 participants
[nested] [flat]
* is there a way to find out if an element is exist in an array
@ 2005-03-03 10:16 b t <qtboyzz@yahoo.com>
2005-03-03 15:17 ` Re: is there a way to find out if an element is exist Joe Conway <mail@joeconway.com>
0 siblings, 1 reply; 2+ messages in thread
From: b t @ 2005-03-03 10:16 UTC (permalink / raw)
To: pgsql-interfaces
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
-Brian
---------------------------------
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: is there a way to find out if an element is exist
2005-03-03 10:16 is there a way to find out if an element is exist in an array b t <qtboyzz@yahoo.com>
@ 2005-03-03 15:17 ` Joe Conway <mail@joeconway.com>
0 siblings, 0 replies; 2+ messages in thread
From: Joe Conway @ 2005-03-03 15:17 UTC (permalink / raw)
To: b t <qtboyzz@yahoo.com>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-03-03 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-03 10:16 is there a way to find out if an element is exist in an array b t <qtboyzz@yahoo.com>
2005-03-03 15:17 ` Re: is there a way to find out if an element is exist Joe Conway <mail@joeconway.com>
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