Re: select users in a group?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: select users in a group?
Дата
Msg-id 200204172033.g3HKXVh29331@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: select users in a group?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Ответы PERL DBI and Novell Netware  (Jeff Post <postjeff@uwm.edu>)
Список pgsql-general
Those numbers are user id's.  If you look in pg_user you will see the
numbers of each user.

Now, we really should have a way of listing the users in a group more
easily.

Added to TODO:

    * Allow easy display of usernames in a group

---------------------------------------------------------------------------

Nigel J. Andrews wrote:
>
>
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: determining database size
Следующее
От: Ed Loehr
Дата:
Сообщение: Questions on 7.2.1 query plan choices