From: | David Orr <dave(at)daveorr(dot)fsnet(dot)co(dot)uk> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | simon(dot)brooke(at)weft(dot)co(dot)uk |
Subject: | bug |
Date: | 2000-10-31 16:25:50 |
Message-ID: | 00103116284400.00849@dave.orr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Your name : Dave Orr
Your email address : dave(at)weft(dot)co(dot)uk
System Configuration
---------------------
Architecture (example: Intel Pentium) :Intel Pentium
Operating System (example: Linux 2.0.26 ELF) :Linux 2-2.14-lmdklinus
PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.2
Compiler used (example: gcc 2.8.0) :gcc 2.95.2
Please enter a FULL description of your problem:
------------------------------------------------
I create two tables where a field in one is constrained to only contain values
that exist in a field in the other. I create a group and grant all on the
constrained table to that group. I grant the group select on the constraining
table. I add a user to the group. When the user tries to insert into the
constrained table, I get permission denied.
I need to grant update on the constraining table in order to insert a record
into the constrained table
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Create a database named test. Run this script into it:
create table by_me(
needed int primary key
);
insert into by_me values(1);
create table im_constrained(
field1 int,
constraint im_constrained_by_me foreign key ( field1)
references by_me
match full
on delete no action
);
create group test;
grant select,update,delete,insert on im_constrained to group test;
grant select on by_me to group test;
Add a user to group "test"
suid to that user and try to add a record
test=> insert into im_constrained values(1);
ERROR: by_me: Permission denied.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Evelyn Mitchell | 2000-10-31 17:59:23 | webmaster@postgres.org gives user unknown |
Previous Message | carol guinebert | 2000-10-31 16:13:38 |