From: | Peter Pilsl <pilsl(at)goldfisch(dot)at> |
---|---|
To: | "Andrew G(dot) Hammond" <drew(at)xyzzy(dot)dhs(dot)org> |
Cc: | postgres mailinglist <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: subtable <-> bigtable |
Date: | 2001-12-16 11:22:28 |
Message-ID: | 20011216122228.C12713@i3.atat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)goldfisch(dot)at
sms : pilsl(at)max(dot)mail(dot)at
pgp-key available
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-12-16 15:13:15 | Re: PostgreSQL 7.1.3 Installation Problem |
Previous Message | Olcsák József | 2001-12-16 11:13:22 | ABSTIME = UNINX TIMESTAMP??? |