From: Michael Fuhr <mike@fuhr.org>
To: Andrus Moor <nospameetasoftnospam@online.ee>
Cc: pgsql-sql@postgresql.org
Subject: Re: select a list of schema names
Date: Sun, 27 Mar 2005 01:04:35 -0700
Message-ID: <20050327080435.GA46395@winnie.fuhr.org> (raw)
In-Reply-To: <d21q20$26ut$1@news.hub.org>
References: <d21q20$26ut$1@news.hub.org>
On Fri, Mar 25, 2005 at 09:50:18PM +0200, Andrus Moor wrote:
>
> How to select a list of schema names which current user is authorized to
> access ?
See "System Catalogs" and "System Information Functions" (or
"Miscellaneous Functions") in the documentation. Here are links
to documentation for the latest release:
http://www.postgresql.org/docs/8.0/interactive/catalogs.htmlhttp://www.postgresql.org/docs/8.0/interactive/functions-info.html
Something like this might be what you're looking for:
SELECT nspname
FROM pg_namespace
WHERE has_schema_privilege(nspname, 'USAGE')
ORDER BY nspname;
Note that USAGE privilege on a schema doesn't necessarily mean the
user has any privileges on the objects in that schema.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
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, nospameetasoftnospam@online.ee
Subject: Re: select a list of schema names
In-Reply-To: <20050327080435.GA46395@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