Problems with permissions and constraints... - Mailing list pgsql-novice

From ericnielsen@earthlink.net
Subject Problems with permissions and constraints...
Date
Msg-id 200102041621369.SM01088@m2w042
Whole thread Raw
List 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 by date:

Previous
From: Bruno Dickhoff
Date:
Subject: PGSQL Hosting providers?
Next
From: "ericnielsen@earthlink.net"
Date:
Subject: RE: Problems with permissions and constraints...