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

Foreign keys breaks tables permissions

From: Raul Chirea <raul(at)brahms(dot)ro>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Foreign keys breaks tables permissions
Date: 2000-04-12 02:49:44
Message-ID: 38F3E447.6C87FDDE@brahms.ro (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackerspgsql-sql
Hi,

If one does:

 create table master (
  id integer not null,
  primary key (id)
 );

 create table detail (
  id integer not null,
  master_id integer not null,
  primary key (id),
  foreign key (master_id) references master (id)
 );

 insert into master (id) values (1);

 grant select on master to a_user;
 grant select, insert, update, delete on detail to a_user;

then if login as "a_user" and does:

  insert into detail (id, master_id) values (1, 10);

this will result in: "ERROR:   master: Permission denied".

This seems a bug to me ? Isn't it ?

Regards,
Raul Chirea.




Responses

pgsql-hackers by date

Next:From: Jan WieckDate: 2000-04-12 12:25:49
Subject: Re: [SQL] Foreign keys breaks tables permissions
Previous:From: Bernard FrankpittDate: 2000-04-08 22:20:19
Subject: Re: [HACKERS] Doc updates

pgsql-bugs by date

Next:From: Mark HollomonDate: 2000-04-12 07:45:48
Subject: Re: Re: postgresql rule bug
Previous:From: Kevin P. NealDate: 2000-04-12 02:21:53
Subject: Minimal patches for PostgreSQL 7.0b3 on NetBSD/alpha 1.4.1....

pgsql-sql by date

Next:From: Thomas LockhartDate: 2000-04-12 04:20:36
Subject: Re: [HACKERS] SQL92 specification ....
Previous:From: tjk@tksoft.comDate: 2000-04-11 22:32:39
Subject: Re: Threaded Records in SQL: Advice Needed

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