Re: Does a user have usage on a schema?

Поиск
Список
Период
Сортировка
Искать
От
Walker, Jed S
Тема
Re: Does a user have usage on a schema?
Дата
Msg-id
4A59B6AA01F1874283EA66C976ED51FC46611A@COENGEXCMB01.cable.comcast.com
Список
Дерево обсуждения
Re: Does a user have usage on a schema? "Walker, Jed S" <Jed_Walker@cable.comcast.com>
Re: Does a user have usage on a schema? Bruno Wolff III <bruno@wolff.to>
Thanks Bruno. I found the definitions for the has_schema_privilege and
it appears it'll work.

Also, how can I query against pg_namespace to find out what schemas a
user has. I've tried something like

Select * from pg_namespace where 'username' = any(nspacl);

I'd like to get a listing of rows such as

Schema1
Schema2
schema7

But that (and some other similar attempts) aren't working. How can I do
this?

Thanks again,

Jed. 

-----Original Message-----
From: Bruno Wolff III [mailto:bruno@wolff.to] 
Sent: Wednesday, June 29, 2005 9:37 AM
To: Walker, Jed S
Cc: pgsql-novice@postgresql.org
Subject: Re: Does a user have usage on a schema?

On Wed, Jun 29, 2005 at 08:57:32 -0600,
  "Walker, Jed S"  wrote:
> How can I query the database to determine if a user has usage on a 
> particular schema, and how can I query the database to find out all 
> the schemas a user has usage on?

The has_schema_privilege function will allow you to check if a user has
access to a schema. You can use pg_users to get a list of all users and
pg_namespace can be used to get a list of all schemas.
В списке pgsql-novice по дате отправления
От: Bruno Wolff III
Дата:
От: Bruno Wolff III
Дата:
FAQ