| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> |
| Cc: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Break referential integrity. |
| Date: | 2003-07-02 04:14:49 |
| Message-ID: | 20030701211322.L66304-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-07-02 05:37:22 | Re: LEAST and GREATEST functions? |
| Previous Message | Ang Chin Han | 2003-07-02 04:02:10 | Re: LEAST and GREATEST functions? |