Обсуждение: Getting users/privs for tables.

Поиск
Список
Период
Сортировка

Getting users/privs for tables.

От
"Gauthier, Dave"
Дата:

Hi:

 

I'm trying to determine who has what privs for what tables.  Couldn't find any canned views for that (but may have missed it).  Or is there a query that can get this from the metadata somehow?

 

Thanks in Advance.

Re: Getting users/privs for tables.

От
Tom Lane
Дата:
"Gauthier, Dave" <dave.gauthier@intel.com> writes:
> I'm trying to determine who has what privs for what tables.  Couldn't find any canned views for that (but may have
missedit).  Or is there a query that can get this from the metadata somehow? 

You could try using has_table_privilege() in a join between pg_class and
pg_authid ... might be a bit slow though.

            regards, tom lane

Re: Getting users/privs for tables.

От
Adrian Klaver
Дата:

On Thursday, March 17, 2011 7:48:37 am Gauthier, Dave wrote:

> Hi:

>

> I'm trying to determine who has what privs for what tables. Couldn't find

> any canned views for that (but may have missed it). Or is there a query

> that can get this from the metadata somehow?

>

> Thanks in Advance.

http://www.postgresql.org/docs/9.0/interactive/information-schema.html

role_table_grants

and/or

table_privileges

--

Adrian Klaver

adrian.klaver@gmail.com

Re: Getting users/privs for tables.

От
"Gauthier, Dave"
Дата:

information_schema.table_privileges has it.  Thanks !

 

From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, March 17, 2011 10:59 AM
To: pgsql-general@postgresql.org
Cc: Gauthier, Dave
Subject: Re: [GENERAL] Getting users/privs for tables.

 

On Thursday, March 17, 2011 7:48:37 am Gauthier, Dave wrote:

> Hi:

>

> I'm trying to determine who has what privs for what tables. Couldn't find

> any canned views for that (but may have missed it). Or is there a query

> that can get this from the metadata somehow?

>

> Thanks in Advance.

http://www.postgresql.org/docs/9.0/interactive/information-schema.html

role_table_grants

and/or

table_privileges

--

Adrian Klaver

adrian.klaver@gmail.com