Search Postgresql Archives

Re: View to show privileges on views/tables/sequences/foreign tables

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

 



On Thu, Feb 21, 2013 at 9:38 AM, bricklen <bricklen@xxxxxxxxx> wrote:
> A while back I was looking for a way to display object privileges
> quickly with a bit better readibility. The following view is what I
> came up with. Suggestions and improvements welcome (or comments
> stating that there are much easi\er ways to get the same details).

The information schema exposes a lot of the same information, so it
might be more portable to query from there rather than using the
object_privileges view.
Eg. for table privileges:

select * from information_schema.table_privileges where table_name =
'event' limit 1;
-[ RECORD 1 ]--+---------
grantor        | postgres
grantee        | PUBLIC
table_catalog  | testdb
table_schema   | public
table_name     | event
privilege_type | INSERT
is_grantable   | YES
with_hierarchy | NO


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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