Re: Discovering privileges - Mailing list pgsql-interfaces

From Michael Fuhr
Subject Re: Discovering privileges
Date
Msg-id 20050320154247.GA18843@winnie.fuhr.org
Whole thread Raw
In response to Discovering privileges  (Murray Cumming <murrayc@murrayc.com>)
Responses Re: Discovering privileges
List pgsql-interfaces
On Sun, Mar 20, 2005 at 03:50:30PM +0100, Murray Cumming wrote:

> I'm using the pg_user and pg_group system tables to discover the list of
> users, and the groups to which they belong.
> 
> But how can I discover the privileges that these users and groups have
> for the various tables. Is this also in one of the system tables?

You could look at pg_class.relacl, but the "Access Privilege Inquiry
Functions" (has_table_privilege(), etc.) might be easier to use.

http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-interfaces by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Discovering privileges
Next
From: Michael Fuhr
Date:
Subject: Re: Discovering privileges