From: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
---|---|
To: | "'Philip Warner'" <pjw(at)rhyme(dot)com(dot)au>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | AW: deficiency on delete and update instead rules for v iews |
Date: | 2000-11-23 13:03:47 |
Message-ID: | 11C1E6749A55D411A9670001FA68796336813A@sdexcsrv1.f000.d0188.sd.spardat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> >We lack a syntax that would enable us to write an on update/delete do instead rule
> >that would efficiently map an update/delete to a table that is referenced by a view.
> >
> >Currently the only rule you can implement is one that uses a primary key.
> >This has the disadvantage of needing a self join to find the appropriate rows.
> >
>
> One of the concepts used in other DBs is to have views with row
> OIDs/DBKeys: ie. views that have one primary table (but maybe have column
> selects, calculations and/or function calls) can still have a real row
> underlying each row. This then allows insert, update & delete to work more
> easily. Doesn't really help now, but it might be useful in a
> future release.
Imho the functionality inside the backend is probably there since old Postgres 4
could do such rules. That is why I said that syntax is missing.
Btw, the insert is not a problem, the on insert do instead rules are straight forward
to write, at least in the cases where other db's allow an insert on a view.
(e.g. on insert to test1 do instead insert into test (a,b) values (new.a, new.b);
where test1 has a few extra calculated columns)
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Don Baccus | 2000-11-23 14:07:35 | Re: Please advise features in 7.1 |
Previous Message | Philip Warner | 2000-11-23 12:38:27 | Re: deficiency on delete and update instead rules for views |