Skip site navigation (1) Skip section navigation (2)

Re: Discovering privileges

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Murray Cumming <murrayc(at)murrayc(dot)com>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Discovering privileges
Date: 2005-03-20 15:42:47
Message-ID: 20050320154247.GA18843@winnie.fuhr.org (view raw or flat)
Thread:
Lists: 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/

In response to

Responses

pgsql-interfaces by date

Next:From: Bruno Wolff IIIDate: 2005-03-20 15:52:30
Subject: Re: Discovering privileges
Previous:From: Murray CummingDate: 2005-03-20 14:50:30
Subject: Discovering privileges

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group