grant select,update - bug or feature? - Mailing list pgsql-admin

From Eugene Karpachov
Subject grant select,update - bug or feature?
Date
Msg-id 20000529151909.A10272@steel.orel.ru
Whole thread Raw
List pgsql-admin
Excuse me for my bad English.

Let us create test database as superuser:

create table master ( i integer primary key, a text);
    -- I want to protect this table from updating by 'dbuser'

create table slave ( j integer references master, b text);
    -- I want to enable updating this table by 'dbuser'

grant select on master to dbuser;
grant select,update on slave to dbuser;

-- populating tables with sample values:
insert into master (i,a) values (1,'one');
insert into master (i,a) values (2,'two');
insert into slave (j,b) values (1,'ONE');

By now, all is ok.


Then, running psql as 'dbuser':

jk=> update slave set b='four';
ERROR:  master: Permission denied.

Why dbuser need 'update' permissions on 'master' table? I only want to
update 'slave' table.

If superuser grants update on master to dbuser, all works.

--
jk

pgsql-admin by date:

Previous
From: R D
Date:
Subject: few securiry questions
Next
From: "William Decker"
Date:
Subject: initdb & pg_encoding