Re: How to list a role's permissions for a given relation?

From: Kynn Jones <kynnjo(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to list a role's permissions for a given relation?
Date: 2009-10-28 20:34:45
Message-ID: c2350ba40910281334v6958de81me8527bb58e7b5575@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks!

kynn

On Tue, Oct 27, 2009 at 4:02 PM, Richard Huxton <dev(at)archonet(dot)com> wrote:

> Kynn Jones wrote:
> > How can I list the permissions of a given user/role for a specific
> > relation/view/index, etc.?
>
> From psql use \dp <tablename>
>
> Using plain SQL, the closest I can think of are the has_xxx_privilege()
> functions:
> http://www.postgresql.org/docs/8.4/static/functions-info.html
>
> There is also the standard information_schema views:
> http://www.postgresql.org/docs/8.4/static/information-schema.html
> e.g. table_privileges, column_privileges
>
> Finally, there are the system-catalogues themselves:
> http://www.postgresql.org/docs/8.4/static/catalogs.html
> Look in pg_class for relacl - an array of table (and index) permissions.
> Similarly pg_proc has proacl for functions.
>
> --
> Richard Huxton
> Archonet Ltd
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roman Neuhauser 2009-10-28 20:56:15 Re: Emal reg expression
Previous Message Viktor Rosenfeld 2009-10-28 20:22:44 could not identify an equality operator for type annotation (Was: could not find array type for data type character varying[])