Обсуждение: pg_user and pg_group

Поиск
Список
Период
Сортировка

pg_user and pg_group

От
q u a d r a
Дата:
How can I select all users and their respective groups
and then have them grouped by their group names?

xxcafe=> select * from pg_user;usename  | usesysid | usecreatedb | usetrace | usesuper | usecatupd |  
passwd  | valuntil
----------+----------+-------------+----------+----------+-----------+----------+----------
user1   |      100 | f           | f        | f        | f         | 
******** |
user2  |      101 | f           | f        | f        | f         | 
******** |
user3  |      102 | f           | f        | f        | f         | 
******** |


xxcafe=> select * from pg_group;    groname      | grosysid | grolist
------------------+----------+---------
xxselectgroup     |      100 | {100,101,102}
xxdeletegroup |      101 | {100}
xxupdategroup |      102 | {100,101}
xxinsertgroup |      103 | {100,101}

usesysid=grolist?
Please help. Thank you very much.