Problems with permissions and constraints...

Поиск
Список
Период
Сортировка
От ericnielsen@earthlink.net
Тема Problems with permissions and constraints...
Дата
Msg-id 200102041621369.SM01088@m2w042
обсуждение исходный текст
Список pgsql-novice
I'm sure there is a simple answer, but I haven't found it yet.  Permission is being denied and I don't see why...


Here's the table structure:(please ignore irregularities in syntax due to sanitizing the tables)

Create table bar (
    barID serial primary key,
    data ...
);
Revoke all on bar from "Public";
Grant Select on bar "me";

Create table baz (
    bazID serial primary key,
    data ...
);
Revoke all on baz from "Public";
Grant Select,Update,Insert,Delete on baz to "me";

Create table foo (
    fooID serial primary key,
    barID int references bar on delete restrict on update cascade,
    bazID int references baz on delete cascade on update cascade,
    data ...
)
Revoke all on foo from "Public";
Grant Select,Update,Insert,Delete on foo to "me";

Insert into foo (barID,bazID,data) values (2,11,...);
ERROR: bar: Permission denied.
The keys(2,11) both exist in their respective tables.  I can do the lookup on them as "me".  Do I have to give "me"
morerights on bar?  Why?  An insert to 
foo should require nothing more than a check if the key exists (Select priviledges right?).

Eric


--------------------------------------------------------------------
Mail2Web - Check your email from the web at
http://www.mail2web.com/ .


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

Предыдущее
От: Bruno Dickhoff
Дата:
Сообщение: PGSQL Hosting providers?
Следующее
От: "ericnielsen@earthlink.net"
Дата:
Сообщение: RE: Problems with permissions and constraints...