Could you not use one trigger for both MV1 and MV2?

Yes I could.
But my use case is to build over 10 "materialized" views that have complex dependencies. And it would not be a feasible solution to handcode all those dependencies into one huge trigger.
"
Triggers: support user defined execution order. Oracle:
     CREATE OR REPLACE TRIGGER TRI_TEST_2 BEFORE INSERT
     ON TEST FOR EACH ROW FOLLOWS TRI_TEST_1.
     MS SQL Server: sp_settriggerorder.
     SQL specifies that multiple triggers should be fired in
time-of-creation order.
     PostgreSQL uses name order, which was judged to be more convenient.
     Derby: triggers are fired in the order in which they were created.
"

Actually I like the PostgreSQL behavior. So far I don't know about
other databases.

I would side on sql and derby.
But name based order is fine.
Then you just name the triggers so that they collate into a proper order by using for example an index number.

- rami

--
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.

Reply via email to