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
u put them in when you created them but I pulled that straight out of my arse. :) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Michael Paesold > Sent: Tuesday, September 10, 2002 1:53 PM > To: [EMAIL PROTECTED] > Subject: [SQL] Rule

[SQL] Rules and Triggers

2002-09-10 Thread Michael Paesold
Hi all, can you tell me in what order rules and triggers are executed? First, what comes first, the rules, or the triggers? And then, in what order are all the rules / triggers executed? Regards, Michael Paesold ---(end of broadcast)--- TIP 6: H