pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedON DELETE CASCADE question
3+ messages / 3 participants
[nested] [flat]
* ON DELETE CASCADE question
@ 2002-06-14 13:40 Wei Weng <wweng@kencast.com>
2002-06-14 16:05 ` Re: ON DELETE CASCADE question Josh Berkus <josh@agliodbs.com>
0 siblings, 1 reply; 3+ messages in thread
From: Wei Weng @ 2002-06-14 13:40 UTC (permalink / raw)
To: pgsql-sql
Does ON DELETE CASCADE attribute you specify in CREATE TABLE statement
actually create triggers for every foreign key it refers to?
Thanks!
--
Wei Weng
Network Software Engineer
KenCast Inc.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ON DELETE CASCADE question
2002-06-14 13:40 ON DELETE CASCADE question Wei Weng <wweng@kencast.com>
@ 2002-06-14 16:05 ` Josh Berkus <josh@agliodbs.com>
2002-06-14 17:14 ` Re: ON DELETE CASCADE question Jan Wieck <JanWieck@Yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Josh Berkus @ 2002-06-14 16:05 UTC (permalink / raw)
To: Wei Weng <wweng@kencast.com>; pgsql-sql
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.
-Josh
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ON DELETE CASCADE question
2002-06-14 13:40 ON DELETE CASCADE question Wei Weng <wweng@kencast.com>
2002-06-14 16:05 ` Re: ON DELETE CASCADE question Josh Berkus <josh@agliodbs.com>
@ 2002-06-14 17:14 ` Jan Wieck <JanWieck@Yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Jan Wieck @ 2002-06-14 17:14 UTC (permalink / raw)
To: Josh Berkus <josh@agliodbs.com>; +Cc: Wei Weng <wweng@kencast.com>; 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@Yahoo.com #
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-06-14 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 13:40 ON DELETE CASCADE question Wei Weng <wweng@kencast.com>
2002-06-14 16:05 ` Josh Berkus <josh@agliodbs.com>
2002-06-14 17:14 ` Jan Wieck <JanWieck@Yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox