Re: View to show privileges on views/tables/sequences/foreign tables - Mailing list pgsql-general

From bricklen
Subject Re: View to show privileges on views/tables/sequences/foreign tables
Date
Msg-id CAGrpgQ8WOBxaSDm6ChOcjcZBrFoQ+fZ7bAJ_p=FBFFgM4KA6Ug@mail.gmail.com
Whole thread Raw
In response to View to show privileges on views/tables/sequences/foreign tables  (bricklen <bricklen@gmail.com>)
List pgsql-general
On Thu, Feb 21, 2013 at 9:38 AM, bricklen <bricklen@gmail.com> 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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Need help extripating plpgsql
Next
From: Ned Wolpert
Date:
Subject: Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid