Re: How to list a role's permissions for a given relation?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: How to list a role's permissions for a given relation?
Дата
Msg-id 4AE751D4.3060700@archonet.com
обсуждение исходный текст
Ответ на How to list a role's permissions for a given relation?  (Kynn Jones <kynnjo@gmail.com>)
Ответы Re: How to list a role's permissions for a given relation?
Список pgsql-general
Kynn Jones wrote:
> How can I list the permissions of a given user/role for a specific
> relation/view/index, etc.?

From psql use \dp <tablename>

Using plain SQL, the closest I can think of are the has_xxx_privilege()
functions:
http://www.postgresql.org/docs/8.4/static/functions-info.html

There is also the standard information_schema views:
http://www.postgresql.org/docs/8.4/static/information-schema.html
e.g. table_privileges, column_privileges

Finally, there are the system-catalogues themselves:
http://www.postgresql.org/docs/8.4/static/catalogs.html
Look in pg_class for relacl - an array of table (and index) permissions.
Similarly pg_proc has proacl for functions.

--
  Richard Huxton
  Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: auto truncate/vacuum full
Следующее
От: Tom Lane
Дата:
Сообщение: Re: auto truncate/vacuum full