Re: Get uasers Group membership - Mailing list pgsql-novice

From Andreas Kretschmer
Subject Re: Get uasers Group membership
Date
Msg-id 20051008053052.GA1007@kaufbach.delug.de
Whole thread Raw
In response to Get uasers Group membership  ("Bluebottle" <luckychap@bluebottle.com>)
List 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 by date:

Previous
From: "Bluebottle"
Date:
Subject: Get uasers Group membership
Next
From: Péter
Date:
Subject: delphi+adodb+postgresql+bytea