> > Because that's what you asked upd1/2 to do for you. To see what is > > happening, try selecting row id=53597 then manually running each rule > > yourself, substituting in the OLD.foo from your selected row. You should > > find that there are two rows that match 53597 on (cursus_id, vers_id, > > traiter, code_type_academic) - itself and one other. > > Sorry, I didn't understand the manuel test procedure > > What is happening here? I am doing an update and the condition is on the ID > and it is corresponding to the last Rule so why should the other rules > interfer.
Here you misunderstand. You've got an UPDATE on that table set to trigger a RULE. *All* the rules. Postgresql is not just going to pick one based on what it thinks you might mean. Since you've got 3 rules for UPDATE on that table, I imagine all three rules are getting fired. With DO INSTEAD I expect either the first one or the last one to win, I don't know enough about the specifics. Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
pgpxGRwBvxvwt.pgp
Description: PGP signature