From: Michael Fuhr <mike@fuhr.org>
To: Kyle Bateman <kyle@actarg.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: permissions from system catalogs
Date: Mon, 26 Jun 2006 19:36:22 -0600
Message-ID: <20060627013622.GA4184@winnie.fuhr.org> (raw)
In-Reply-To: <44A06E04.5000206@actarg.com>
References: <44A06E04.5000206@actarg.com>
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-TABLEhttp://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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, kyle@actarg.com
Subject: Re: permissions from system catalogs
In-Reply-To: <20060627013622.GA4184@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox