Re: Foreign keys and access privileges

From: mkresse(at)slyde(dot)in-berlin(dot)de
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: Foreign keys and access privileges
Date: 2000-05-18 22:19:36
Message-ID: 200005182220.e4IMKvT32127@einhorn.in-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> mkresse(at)slyde(dot)in-berlin(dot)de writes:
> > Now, with Postgres 7.0 RC1, when some user (not the owner of the
> > db, of course) tries to update, change or insert anything into
> > choice, he gets an error message that says 'Permission denied' for
> > table users.
>
> IIRC this is a known bug in RC1 (permissions not handled correctly
> for foreign key references). Have you tried it in 7.0 final?

Yes, it's still there (in 7.0). Try the following two tables:

create table a(x integer primary key);
create table b(y integer references a);
grant all on b to public;

When someone else than the owner tries an insert into b, he gets
a 'Permission denied'. For the operation to be successful, he needs
to have select and update privileges on a.

Ciao,
Martin

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-05-18 23:17:06 Re: Foreign keys breaks tables permissions
Previous Message Ross J. Reedstrom 2000-05-18 22:03:18 Library sort order (was Re: SQL command speed)