From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | "Jan Wieck" <JanWieck(at)Yahoo(dot)com>, "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Should this require CASCADE? |
Date: | 2002-07-11 03:30:41 |
Message-ID: | GNELIHDDFBOCMGBFGEFOIEBECDAA.chriskl@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > As far as this question, seems with no RESTRICT/CASCADE, it fails, with
> > RESTRICT it drops the trigger, and with CASCADE it drops the referencing
> > table. Is that accurate?
>
> Not at all. CASCADE would drop the foreign key constraint (including
> the triggers that implement it), but not the other table. In my mind
> the issue is whether RESTRICT mode should do the same, or report an
> error.
>
> I'm not eager to accept the idea that DROP-without-either-option should
> behave in some intermediate fashion. I want it to be the same as
> RESTRICT.
I think that an unqualified drop should restrict and fail to drop if there's
a foreign key. Any app that lets people do a drop is probably already
checking for error conditions. Hence, it's just another error condition.
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-11 03:31:20 | Re: Should this require CASCADE? |
Previous Message | Bradley Baetz | 2002-07-11 03:29:26 | Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org |