From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Kyle Bateman <kyle(at)actarg(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: permissions from system catalogs |
Date: | 2006-06-27 01:36:22 |
Message-ID: | 20060627013622.GA4184@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Jones | 2006-06-27 02:49:26 | Re: avg(interval) |
Previous Message | Tom Lane | 2006-06-27 01:28:51 | Re: permissions from system catalogs |