Re: drop table and references - Mailing list pgsql-general

From Stephan Szabo
Subject Re: drop table and references
Date
Msg-id Pine.BSF.4.21.0101091501080.69680-100000@megazone23.bigpanda.com
Whole thread Raw
In response to drop table and references  ("Martin A. Marques" <martin@math.unl.edu.ar>)
Responses Re: drop table and references  ("Martin A. Marques" <martin@math.unl.edu.ar>)
List pgsql-general
On Tue, 9 Jan 2001, Martin A. Marques wrote:

> I have a big doubt. If I drop a table with a primary key to which other
> tables reference to, what happens? And If I create the table again, just as
> it was, but maybe with another column?

Theoretically (ie, assuming no bugs), when you drop the table the foreign
key constraints are dropped as well.  If you recreate the table the
constraints are not recreated, you'd have to use ALTER TABLE ADD
CONSTRAINT to make them again.



pgsql-general by date:

Previous
From: "Andrew W. Nosenko"
Date:
Subject: Re: is there a vendor independent C API for DB development?
Next
From: Tom Lane
Date:
Subject: Re: Re: COPY error: pqReadData() -- backend closed the channel unexpectedly