From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Break referential integrity. |
Date: | 2003-07-09 19:06:34 |
Message-ID: | 3F0C67BA.2050209@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Stephan Szabo wrote:
> On Wed, 2 Jul 2003, Rudi Starcevic wrote:
>
>> Hi,
>>
>> I know that if you have a trigger and function then drop/replace the
>> function the trigger needs
>> to be drop/replaced too so that it can see the new function.
>>
>> Is it the same for Ref. Integ. on table's too ?
>>
>> If table B's foreign key references table A and you drop/replace table A
>> then the reference from table B to table A is broken and needs to be
>> recreated ?
>
> In recent versions, you should not be drop table A without specifying
> cascade which will drop the constraint for you (and thus you'll need to
> recreate it). In older versions, I'm not 100% sure what'd happen, but you
> probably should drop and recreate it for good measure.
Older versions spit out a NOTICE and dropped the constraint, so they
kinda defaulted to CASCADE.
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 #
From | Date | Subject | |
---|---|---|---|
Next Message | Michael A Nachbaur | 2003-07-09 21:14:19 | Home-brewed table syncronization |
Previous Message | Yasir Malik | 2003-07-09 18:55:04 | Re: Datatype conversion help |