Rules and Triggers: another question - Mailing list pgsql-sql

From Jerome Chochon
Subject Rules and Triggers: another question
Date
Msg-id 012c01c25d4e$57791320$80a337c1@pclisi17
Whole thread Raw
List pgsql-sql
Hi all.
 
Sorry to ask you another time this 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 DELETE TO table_name
DO select function();

When i delete values, which one will call the function the first ?

Someone can help me ??
 
And if I want to use only function, do I use Trigger or Rules ?

(Thanks to M. Michael Paesold to answer my question but I want another answer to be sure)
 
Best Regards.
 
Jérêom Chochon

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp Fractions Problem
Next
From: "Florian Mader"
Date:
Subject: Re: Timestamp Fractions Problem