Re: [SQL] Rules and Triggers: another question

2002-09-12 Thread Michael Paesold
Jerome Chochon wrote: > Thanks for your answer but i have another question. > Which one is the faster ? > > If i write this trigger... > CREATE TRIGGER trigger_name > BEFORE DELETE > ON table_name > FOR EACH ROW EXECUTE PROCEDURE function(); > > and this rule: > CREATE RULE name_rule AS > ON DE

Re: [SQL] Rules and Triggers

2002-09-10 Thread Ross J. Reedstrom
On Tue, Sep 10, 2002 at 09:45:16PM +0200, Michael Paesold wrote: > > Adam Erickson wrote: > > > Correct me if I'm wrong, but rules constrain the SQL (ie. validation). > > Triggers are carried out after the SQL is executed and the data is > modified. > > So, to answer your question, I think rules

Re: [SQL] Rules and Triggers

2002-09-10 Thread Michael Paesold
Adam Erickson wrote: > Correct me if I'm wrong, but rules constrain the SQL (ie. validation). > Triggers are carried out after the SQL is executed and the data is modified. > So, to answer your question, I think rules come first. As to which order > the rules / triggers are executed probably de

Re: [SQL] Rules and Triggers

2002-09-10 Thread Adam Erickson
Correct me if I'm wrong, but rules constrain the SQL (ie. validation). Triggers are carried out after the SQL is executed and the data is modified. So, to answer your question, I think rules come first. As to which order the rules / triggers are executed probably depends on the order you put them