Re: ON DELETE CASCADE question

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Wei Weng <wweng(at)kencast(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: ON DELETE CASCADE question
Date: 2002-06-14 17:14:39
Message-ID: 3D0A247F.EADC659D@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)Yahoo(dot)com #

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Matt 2002-06-14 17:38:02 inheritance problems
Previous Message Josh Berkus 2002-06-14 16:05:19 Re: ON DELETE CASCADE question