pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
grant select,update - bug or feature? 2+ messages / 1 participants [nested] [flat]
* grant select,update - bug or feature? @ 2000-05-29 11:19 Eugene Karpachov <jk@steel.orel.ru> 0 siblings, 1 reply; 2+ messages in thread From: Eugene Karpachov @ 2000-05-29 11:19 UTC (permalink / raw) To: pgsql-general@postgresql.org; +Cc: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: grant select,update - bug or feature? @ 2000-05-30 12:40 Eugene Karpachov <jk@steel.orel.ru> parent: Eugene Karpachov <jk@steel.orel.ru> 0 siblings, 0 replies; 2+ messages in thread From: Eugene Karpachov @ 2000-05-30 12:40 UTC (permalink / raw) To: Stephan Szabo <sszabo@kick.com>; +Cc: pgsql-admin Mon, May 29, 2000 at 08:51:10PM -0700, Stephan Szabo write: > This is a known issue in the 7.0 foreign key implementation. The short Thank you, now it's clear for me. > It's something that will get fixed, it's just a question of how and when. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It's just what I want to know :) > > create table master ( i integer primary key, a text); > > -- I want to protect this table from updating by 'dbuser' By the way, how can I make such a protection? Are triggers the only way? > > 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; -- jk ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-05-30 12:40 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-05-29 11:19 grant select,update - bug or feature? Eugene Karpachov <jk@steel.orel.ru> 2000-05-30 12:40 ` Eugene Karpachov <jk@steel.orel.ru>
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