Re: Foreign keys and access privileges

Поиск
Список
Период
Сортировка
От mkresse@slyde.in-berlin.de
Тема Re: Foreign keys and access privileges
Дата
Msg-id 200005182220.e4IMKvT32127@einhorn.in-berlin.de
обсуждение исходный текст
Ответ на Re: Foreign keys and access privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
> mkresse@slyde.in-berlin.de writes:
> > Now, with Postgres 7.0 RC1, when some user (not the owner of the 
> > db, of course) tries to update, change or insert anything into 
> > choice, he gets an error message that says 'Permission denied' for 
> > table users. 
> 
> IIRC this is a known bug in RC1 (permissions not handled correctly
> for foreign key references).  Have you tried it in 7.0 final?

Yes, it's still there (in 7.0). Try the following two tables:

create table a(x integer primary key);
create table b(y integer references a);
grant all on b to public;

When someone else than the owner tries an insert into b, he gets 
a 'Permission denied'. For the operation to be successful, he needs 
to have select and update privileges on a.

Ciao,Martin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Foreign keys breaks tables permissions
Следующее
От: "Rudolph, Michael"
Дата:
Сообщение: AW: What is the difference between NULL and "undef"