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

Поиск
Список
Период
Сортировка
От Holger Jakobs
Тема Re: how to list privileges on the database object itself via SQL?
Дата
Msg-id 5d4cc93e-cea0-6b99-53d3-2f0c7a3d6a59@jakobs.com
обсуждение исходный текст
Ответ на Re: how to list privileges on the database object itself via SQL?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Список pgsql-admin
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


Вложения

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

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: how to list privileges on the database object itself via SQL?
Следующее
От: richard coleman
Дата:
Сообщение: Re: how to list privileges on the database object itself via SQL?