Re: permissions from system catalogs - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: permissions from system catalogs
Date
Msg-id 20060627013622.GA4184@winnie.fuhr.org
Whole thread Raw
In response to permissions from system catalogs  (Kyle Bateman <kyle@actarg.com>)
List pgsql-sql
On Mon, Jun 26, 2006 at 05:30:12PM -0600, Kyle Bateman wrote:
> Can anyone point me where to look in the system catalogs (or information 
> schema) to determine in advance whether a given user (or the current 
> user) will have select permission to a given table or view?

An easy way is to use the has_table_privilege() function.  See also
information schema views whose names contain the word "grants" or
"privileges."

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

(Adjust the version number in the above links if you're using a
version other than 8.1)

-- 
Michael Fuhr


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: permissions from system catalogs
Next
From: Erik Jones
Date:
Subject: Re: avg(interval)