> > 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
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 <kleptog(at)svana(dot)org> 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.
In response to
pgsql-general by date
|Next:||From: Richard Huxton||Date: 2004-09-29 12:20:02|
|Subject: Re: Multiple Rules :: Postgres Is confused !!|
|Previous:||From: Martijn van Oosterhout||Date: 2004-09-29 11:43:11|
|Subject: Re: About PostgreSQL's limit on arithmetic operations|