From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Rudi Starcevic <rudi@oasis.net.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Break referential integrity.
Date: Tue, 1 Jul 2003 21:14:49 -0700 (PDT)
Message-ID: <20030701211322.L66304-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3F0258B6.1040908@oasis.net.au>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, rudi@oasis.net.au
Subject: Re: Break referential integrity.
In-Reply-To: <20030701211322.L66304-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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