Re: [BUGS] Multiple-action rule surprise

2005-08-04 Thread Andrew - Supernews
On 2005-08-04, "Eugene Shekhtman" <[EMAIL PROTECTED]> wrote: > PostgreSQL version: 8.0.3 > OS: Win32 (Win 2003 Server) > > There is something strange and counterintuitive about the way that > multiple-action PostgreSQL rules work. The absolute first thing you must learn about using rules in postgr

Re: [BUGS] Multiple-action rule surprise

2005-08-04 Thread Jaime Casanova
> -- Now I add to the "upd_if" rule > -- a condition that checks if a similar record already exists > CREATE OR REPLACE RULE upd_if AS ON UPDATE TO test.view1 >WHERE ((SELECT count(*) AS count1 FROM test.table1 WHERE table1.data1 = > new.data1)) = 0 >DO ( >UPDATE tes