Re: missing data in information_schema grant_* tables?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: missing data in information_schema grant_* tables?
Дата
Msg-id 1263557893.30974.1.camel@fsopti579.F-Secure.com
обсуждение исходный текст
Ответ на missing data in information_schema grant_* tables?  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: missing data in information_schema grant_* tables?  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On fre, 2010-01-15 at 12:00 +0100, Fabien COELHO wrote:
> INSERT to PUBLIC is shown on the last line of the access privileges 
> column. However, when looking at the information_schema:
> 
>   psql> SELECT grantor, grantee, privilege_type
>         FROM information_schema.role_table_grants
>         WHERE table_name = 'foo';
>   grantor | grantee | privilege_type
> ---------+---------+----------------
>   fabien  | fabien  | SELECT
>   fabien  | fabien  | INSERT
>   fabien  | fabien  | UPDATE
>   fabien  | fabien  | DELETE
>   fabien  | fabien  | TRUNCATE
>   fabien  | fabien  | REFERENCES
>   fabien  | fabien  | TRIGGER
>   fabien  | calvin  | SELECT
> (8 rows)
> 
> My point is that the grant to "PUBLIC" does not show in the
> information 
> schema. However, it appears in the table_privileges view:
> 
>   psql> SELECT grantor, grantee, privilege_type FROM 
> information_schema.table_privileges WHERE table_name='foo';
>   grantor | grantee | privilege_type
> ---------+---------+----------------
>   ... same as previous query ...
>   fabien  | PUBLIC  | INSERT
> 
> (1) Would you agree that it is a "bug"? That is, if the grantee is
> PUBLIC, 
> it is an enabled role for the current user, so it should appear in
> the 
> role_table_grants view...

The whole point of role_table_grants is that it shows everything that
table_privileges shows except privileges granted to public.  So the
behavior you observe is correct.



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

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: ECPG DESCRIBE [OUTPUT] support
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Streaming replication, loose ends