Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA13333 for ; Thu, 18 May 2000 06:57:39 -0400 (EDT) (envelope-from mkresse@slyde.in-berlin.de) From: mkresse@slyde.in-berlin.de Received: from slyde (DialIN068.vr.in-berlin.de [193.175.22.196]) by einhorn.in-berlin.de (8.10.1/8.10.1/Debian 8.10.1-1) with ESMTP id e4IAvXR09871 for ; Thu, 18 May 2000 12:57:33 +0200 Message-Id: <200005181057.e4IAvXR09871@einhorn.in-berlin.de> X-Authentication-Warning: einhorn.in-berlin.de: Host DialIN068.vr.in-berlin.de [193.175.22.196] claimed to be slyde To: pgsql-sql@postgresql.org Date: Thu, 18 May 2000 12:57:29 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Foreign keys and access privileges X-mailer: Pegasus Mail for Win32 (v3.12a) X-Archive-Number: 200005/46 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