Re: is there a way to find out if an element is exist

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: is there a way to find out if an element is exist
Дата
Msg-id 42272A8E.3090102@joeconway.com
обсуждение исходный текст
Ответ на is there a way to find out if an element is exist in an array  (b t <qtboyzz@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: b t
Дата:
Сообщение: is there a way to find out if an element is exist in an array
Следующее
От: b t
Дата:
Сообщение: how to parse an proargtypes array?