This seems to be the one I was looking for !
I only have some concerns about security, cause I must give full
access to the users to the maintable to allow all the rules be
performed: insert, update, delete anyway and also select cause the
update-command would fail otherwise (see below).
So noone prevents my user to open the maintable via odcb and
ms-access (which is the way they connect) and mess it up - especially
mess up parts that are dedicated to other users.
thnx,
peter
ps: t is the table and t_v1 is the view.
\dp
t | {"=","peter=arwR","test2=aw"}
t_v1 | {"=","peter=arwR","test2=arwR"}
\d t
Table "t"
Attribute | Type | Modifier
-----------+---------+----------
num | integer |
rank | integer |
x | integer |
CREATE RULE update_t_v1 as on update to t_v1 do instead update t set num = new.num, rank=new.rank,x=new.x where
num=old.num;
UPDATE t_v1 set num=10 where num=11;
ERROR: t: Permission denied.
On Sat, Dec 15, 2001 at 11:42:56PM -0500, Andrew G. Hammond wrote:
>
> Yep, and they're called VIEWs. Personally, if the data models well to a
> single table, then I'd stick with a single table design. Use VIEWs to
> break up access and write RULEs to handle INSERT, UPDATE and DELETES.
>
--
mag. peter pilsl
phone: +43 676 3574035
fax : +43 676 3546512
email: pilsl@goldfisch.at
sms : pilsl@max.mail.at
pgp-key available