Re: how to list privileges on the database object itself via SQL?

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

 



Try this command:

with cte as (select oid, datname, (aclexplode(datacl)).* from pg_database where oid>1)   select cte.oid, datname, grantor.rolname as grantorname, coalesce(grantee.rolname, 'public') as granteename, privilege_type, is_grantable
  from cte
  join pg_authid grantor on cte.grantor = grantor.oid
  left join pg_authid grantee on cte.grantee = grantee.oid


--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux