Foreign keys and access privileges

From: mkresse(at)slyde(dot)in-berlin(dot)de
To: pgsql-sql(at)postgresql(dot)org
Subject: Foreign keys and access privileges
Date: 2000-05-18 10:57:29
Message-ID: 200005181057.e4IAvXR09871@einhorn.in-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi there,

Before upgrading to postgres 7.0 RC1, I was using a database like
the following, which worked just fine for me, except for the missing
referential integrity.

create table users(id INTEGER PRIMARY KEY, name VARCHAR);
create view curuser as select * from users where name =
USER::varchar;
grant all on curuser to public;
create table choice(userid INTEGER REFERENCES users, data
INTEGER);
grant all on choice to public;

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.
Is there a way to implement something like this, wthout a 'grant all
on users to public'?
Is it possible at all to let people change tables, that reference
other, non accessable tables?

Quick help would be greatly appreciated.
Thanks a lot,
Martin

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alex Guryanow 2000-05-18 11:34:53 Re[2]: lower() for varchar data by creating an index
Previous Message D'Arcy J.M. Cain 2000-05-18 10:54:20 Re: Using substr with user defined types