Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D0935475E6F for ; Mon, 16 Dec 2002 11:56:43 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.65.60]) by postgresql.org (Postfix) with SMTP id 02F2B476519 for ; Mon, 16 Dec 2002 11:56:25 -0500 (EST) Received: (qmail 23075 invoked by uid 0); 16 Dec 2002 16:56:29 -0000 Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox) (62.178.186.201) by mail.gmx.net (mp005-rz3) with SMTP; 16 Dec 2002 16:56:29 -0000 Message-ID: <009301c2a524$15e39fc0$4201a8c0@beeblebrox> From: "Michael Paesold" To: "Ludwig Lim" , "PostgreSQL Mailing List" References: <20021216164116.77643.qmail@web80314.mail.yahoo.com> Subject: Re: CHECKS vs. BEFORE INSERT OR UPDATE TRIGGER Date: Mon, 16 Dec 2002 17:56:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/190 X-Sequence-Number: 10778 Ludwig Lim wrote: > I am just wondering. Which one is executed first: > CHECK Constraints or BEFORE INSERT OR UPDATE TRIGGER? First the BEFORE... TRIGGERs, then the CHECK contraints, so you definetly can change a row in a trigger to match the contraints... Regards, Michael Paesold