Problems with permissions and constraints...

From: "ericnielsen(at)earthlink(dot)net" <ericnielsen(at)earthlink(dot)net>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Problems with permissions and constraints...
Date: 2001-02-04 21:21:13
Message-ID: 200102041621369.SM01088@m2w042
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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" more rights 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/ .

Browse pgsql-novice by date

  From Date Subject
Next Message ericnielsen@earthlink.net 2001-02-04 21:36:32 RE: Problems with permissions and constraints...
Previous Message Bruno Dickhoff 2001-02-04 19:09:58 PGSQL Hosting providers?