From: | bricklen <bricklen(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: View to show privileges on views/tables/sequences/foreign tables |
Date: | 2013-02-21 18:37:22 |
Message-ID: | CAGrpgQ8WOBxaSDm6ChOcjcZBrFoQ+fZ7bAJ_p=FBFFgM4KA6Ug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Feb 21, 2013 at 9:38 AM, bricklen <bricklen(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ned Wolpert | 2013-02-21 19:59:48 | Database corruption event, unlockable rows, possibly bogus virtual xids? Invalid backend server xid |
Previous Message | Merlin Moncure | 2013-02-21 18:23:00 | Re: Need help extripating plpgsql |