Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role

Поиск
Список
Период
Сортировка
От Louis Lam
Тема Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role
Дата
Msg-id 6D8540A29236624096E719740FC5C75306958A80@guardium-01-ex.atlarge.net
обсуждение исходный текст
Ответ на Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi Tom,

Thank you very much for the quick response.  That was very helpful.  I
was able to find the privilege on pg_language, pg_database and
pg_tablespace.  I am looking for privileges granted to SCHEMA and
SEQUENCE.  Do you by any change know what view or table I can queries to
get privileges granted on these two?

Also when I did a select datacl from pg_database.  The privilege column
look like this.  Do you know if there are some system function to decode
this column?  Or do I have to write code to interpret this myself?

"{=CTc/postgres,postgres=CTc/postgres,louis3=CTc/postgres,qa_test=C*/pos
tgres,louis_role=C*/postgres}"


Again, thank you very much.
Louis Lam.


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, June 02, 2009 4:12 PM
To: Louis Lam
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] catalog view use to find DATABASE, LANGUAGE,
TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role

"Louis Lam" <louis.lam@guardium.com> writes:
> In PostgreSQL, there are some grant privileges like grant on SEQUENCE,
> DATABASE, LANGUAGE, SCHEMA and DATABASE.  I grant and revoke these
> privleges on my PostgreSQL on Windows and Linux OS.  But once it is
> granted, how do I find out what user and role are granted with these
> privileges?

It's stored in the various "acl" columns of the system catalogs, which
you can look at either directly or via psql's \d commands.  See the
GRANT reference page for an example and a discussion of how to read
the entries.

            regards, tom lane

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

Предыдущее
От: Ben Chobot
Дата:
Сообщение: Re: Really out of memory?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role