A Referntial integrity

From: "Niraj Bhatt" <nirajb(at)mahindrabt(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <balpannu1(at)aol(dot)com>
Subject: A Referntial integrity
Date: 2000-07-06 14:29:47
Message-ID: 000801bfe756$a6ab2160$9c02040a@mahindrabt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

We are using a postgresql-7.0.2. Consider the following scenario

we have created a table t1 with columns

c1 : having referential integrity with t2.c1
c2 : having referential integrity with t3.c2

where t2 and t3 are different tables

Assume that t2 has also got a referential integrity with t4.c3 where c3 is a column in t2 as well.

Now I want to drop a constraint of table t2 that is referring to t4.c3. As per the documentation one can not drop a constraint in alter table command. In this situation I need to drop the table t2. But I can not drop this table since it has got child in table t1.
Do I need to drop t1 as well ?? This one is a classical example of master detail - detail relation ship with dependent details which is very trivial in real world. Infect in more complex design such detail - detail relationship can go upto several levels. Every time dropping a table is not good. Is there any other way to do this?? Please elaborate on this

Regards

Niraj Bhatt

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Lockhart 2000-07-06 14:35:33 Re: Find all the dates in the calendar week?
Previous Message Thomas Good 2000-07-06 14:23:04 Scrappy as Peacemaker...Thanks! (fwd)