Re: Table restructuring with referential integrity

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mihai Gheorghiu <tanethq(at)earthlink(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Table restructuring with referential integrity
Date: 2001-10-29 21:56:06
Message-ID: 20011029135546.S10592-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 29 Oct 2001, Mihai Gheorghiu wrote:

> I have two tables t1 and t2, which have a referential integrity defined like
> t2 references t1. I need to re-create t1, because I'm changing the field
> structure (dropping fields included). So I do a drop t1 followed by a new
> create t1. When I drop t1, I get a notice that the referential integrity
> trigger will be implicitly dropped from t2. Does this mean that I have to
> re-create t2 too?

You should only need to recreate the constraint using ALTER TABLE.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lixin Zhou 2001-10-29 22:22:59 Re: create function question
Previous Message Tom Lane 2001-10-29 20:54:15 Re: Select limit... erm so..