Ok now I think I have a need for definite order in trigger execution.
I am implementing materialized views with triggers.
I have a base table T1.
Then I create a materialized view MV1 (which is actually a table) that
is updated by triggers on table T1.
Then I create a second second materialized view MV2.
Again I update it with triggers on table T1.
But this time it also reads MV1 for some generated values.
In order for this to work I need a quarantee that MV1 gets updated
before MV2.
And since both of their update is implemented by trigger(s) on T1 I
would need a definite unchanging order.
Now one could say why not just create the triggers that update MV2 on MV1.
But sometimes when T1 is updated, MV1 does not get updated but MV2 should.
So if this would be easy it would be much appreciated :-)
- rami
On 20.5.2010 23:06, Thomas Mueller wrote:
Hi,
Are triggers always executed in the order they are created?
I'm not sure what the current implementation does, but in general if
there are multiple triggers, the order in which they are called is
undefined. I will document that.
Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.