Search Postgresql Archives

Re: lists all users under groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

By using -E to see the outputs, figure out a way by myself:

select distinct g.groname, u.usename from pg_catalog.pg_user u, pg_catalog.pg_group g WHERE u.usesysid = ANY(g.grolist) order by groname, usename;

Do you have a simpler way such as \d???

Thanks,
Emi


Greetings,

May I ask is there a simple way like \dg+ to get all users' names under all groups please? If no, which sys tables should I use to get it?

I am expecting something like :

Group name   | Users
----------------------------------
g1  |      u1, u2, u3
g2  |      u1
g3  |      u6

Thanks a lot!
Emi


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux