pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mkresse@slyde.in-berlin.de
To: pgsql-sql@postgresql.org
Subject: Foreign keys and access privileges
Date: Thu, 18 May 2000 12:57:29 +0200
Message-ID: <200005181057.e4IAvXR09871@einhorn.in-berlin.de> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <200005181057.e4IAvXR09871@einhorn.in-berlin.de>
Permalink:  ../200005181057.e4IAvXR09871@einhorn.in-berlin.de/
Also on:    postgresql.org/message-id/200005181057.e4IAvXR09871@einhorn.in-berlin.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mkresse@slyde.in-berlin.de
  Subject: Re: Foreign keys and access privileges
  In-Reply-To: <200005181057.e4IAvXR09871@einhorn.in-berlin.de>
  References: <200005181057.e4IAvXR09871@einhorn.in-berlin.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox