Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 0A151477317 for ; Fri, 14 Jun 2002 13:31:53 -0400 (EDT) Received: from smtp016.mail.yahoo.com (smtp016.mail.yahoo.com [216.136.174.113]) by postgresql.org (Postfix) with SMTP id 4AED2475902 for ; Fri, 14 Jun 2002 13:14:48 -0400 (EDT) Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 14 Jun 2002 17:14:47 -0000 Message-ID: <3D0A247F.EADC659D@Yahoo.com> Date: Fri, 14 Jun 2002 13:14:39 -0400 From: Jan Wieck X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-6.1.1smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Josh Berkus Cc: Wei Weng , pgsql-sql@postgresql.org Subject: Re: ON DELETE CASCADE question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/209 X-Sequence-Number: 8174 Josh Berkus wrote: > > Wei, > > > Does ON DELETE CASCADE attribute you specify in CREATE TABLE > > statement > > actually create triggers for every foreign key it refers to? > > > > Yes. Two triggers for each key, I think. Three, one for INSERT OR UPDATE on the FK table, one for UPDATE on the PK table and one for DELETE on PK. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #