Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8BFE1475A9E for ; Mon, 16 Sep 2002 03:07:15 -0400 (EDT) Received: from graal.ensma.fr (graal.ensma.fr [193.55.167.3]) by postgresql.org (Postfix) with ESMTP id 39C244758BD for ; Mon, 16 Sep 2002 03:07:14 -0400 (EDT) Received: from pclisi17 (pc-lisi17.ensma.fr [193.55.163.128]) by graal.ensma.fr (8.9.1b+Sun/8.9.1) with SMTP id IAA11931 for ; Mon, 16 Sep 2002 08:47:20 +0100 (WET DST) Message-ID: <012c01c25d4e$57791320$80a337c1@pclisi17> Reply-To: "Jerome Chochon" From: "Jerome Chochon" To: Subject: Rules and Triggers: another question Date: Mon, 16 Sep 2002 08:57:37 +0200 Organization: LISI-ENSMA MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0129_01C25D5F.1AC4B310" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/153 X-Sequence-Number: 9430 This is a multi-part message in MIME format. ------=_NextPart_000_0129_01C25D5F.1AC4B310 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 answ= er to be sure) Best Regards. J=E9r=EAom Chochon ------=_NextPart_000_0129_01C25D5F.1AC4B310 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi=20 all.
 
Sorry to ask=20 you another time this question.
Which one is=20 the faster ?

If i write this trigger...
CREATE TRIGGER=20 trigger_name
BEFORE DELETE
ON table_name
FOR EACH ROW EXECUTE PROC= EDURE=20 function();

and this rule:
CREATE RULE name_rule AS
ON DELETE = TO=20 table_name
DO select function();

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

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

(Thanks to M. Michael Paesold to answer= my=20 question but I want another answer to be sure)
 
Best Regards.
 
J=E9r=EAom Chochon
<= /HTML> ------=_NextPart_000_0129_01C25D5F.1AC4B310--