Skip site navigation (1) Skip section navigation (2)

Re: bug

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: dave(at)weft(dot)co(dot)uk
Cc: pgsql-bugs(at)postgresql(dot)org, simon(dot)brooke(at)weft(dot)co(dot)uk
Subject: Re: bug
Date: 2000-10-31 18:52:51
Message-ID: Pine.BSF.4.10.10010311051170.62684-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-bugs
This is a known problem in 7.0.x.  The insert/update
constrained table case should be fixed in 7.1.

You can get details about it in the mailing list archives.

Stephan Szabo
sszabo(at)bigpanda(dot)com

On Tue, 31 Oct 2000, David Orr wrote:

> 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:
> ---------------------------------------------------------------------
> 


In response to

  • bug at 2000-10-31 16:25:50 from David Orr

pgsql-bugs by date

Next:From: Bernie HuangDate: 2000-10-31 18:57:23
Subject: strange array insertion
Previous:From: Trurl McByteDate: 2000-10-31 18:41:58
Subject: Re: 68E5-58AF-9EBF : CONFIRM from pgsql-bugs (set)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group