Re: Get uasers Group membership

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Get uasers Group membership
Дата
Msg-id 20051008053052.GA1007@kaufbach.delug.de
обсуждение исходный текст
Ответ на Get uasers Group membership  ("Bluebottle" <luckychap@bluebottle.com>)
Список pgsql-novice
Bluebottle <luckychap@bluebottle.com> schrieb:
> In an application I want to confirm that a person is a member of a group eg I
> am looking for a function that receives the userid and groupname, and returns a
> Boolean yes/no answer. Alternatively, is there a way of listing the members of
> a groups ( from which I can write my own function)?

Hi,

pg_group contains information about groups and users. The fild
'groname' is the name, and grolist is a array of user id's in this
group.

You should select the usesysid from pg_user and then you can search this
id in pg_group. (select ... where $ID in any(grolist);)


untestet, i havn't groups here in my local instalation)



Btw.: dont't write HTML in Mailinglists, please.


Regards, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Bluebottle"
Дата:
Сообщение: Get uasers Group membership
Следующее
От: Péter
Дата:
Сообщение: delphi+adodb+postgresql+bytea