Re: select users in a group?
От | Nigel J. Andrews |
---|---|
Тема | Re: select users in a group? |
Дата | |
Msg-id | Pine.LNX.4.21.0204172050010.20382-100000@ponder.fairway2k.co.uk обсуждение исходный текст |
Ответ на | Re: select users in a group? ("Johnson, Shaunn" <SJohnson6@bcbsm.com>) |
Ответы |
Re: select users in a group?
|
Список | pgsql-general |
On Wed, 17 Apr 2002, Johnson, Shaunn wrote: > --WAIT ... I'm sorry ... by bad ... > > --I'm looking at the table pg_group and I see > the group 'staff' listed ... along the lines, I see > what I can only assume is the UID-ish numbers > of the users that are in the group. > > --NOW ... I want to go from THAT point to figuring > out who those people are ... > > --Hope I caught this in time ... > > -X > > -----Original Message----- > > > Howdy: > > I'm running Postgres 7.1.3 on RedHat Linux 2.4.7-rel 10. > > How can I get a list of the users in a group? For example, > I created a group called 'staff' ... I know there are five people > in this group, but how can I *see* everyone in this group? > > Thanks! > > -X > > Now, it's just a suggestion as I've not used arrays before but have you tried something like: SELECT u.usename FROM pg_user u WHERE EXISTS (SELECT 1 FROM pg_group g WHERE g.grolist *= u.usesysid); You should look up arrays in the documentation since I see from there that the *= operator is probably an extension you need to install. -- Nigel J. Andrews Director --- Logictree Systems Limited Computer Consultants
В списке pgsql-general по дате отправления: