Re: How to overwrite a table [only data]? - Mailing list pgadmin-support

From Harald Armin Massa
Subject Re: How to overwrite a table [only data]?
Date
Msg-id 7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@mail.gmail.com
Whole thread Raw
In response to How to overwrite a table [only data]?  ("Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>)
List pgadmin-support
Ezequias ,

I would like to overwrite a table with problem with his original. But there are some points.

I can't just delete and restore it becouse it has a foreign key and when I try to delete it ask for drop cascade.

As I know the drop cascade delete in both tables the rows related. Is it correct ?

You are right.

Your database structure disallows this kind of deletes.

So, if you want to allow it, you have to disable / remove that foreign key restriction, refresh your data, and reimplement that restriction.

Be aware that foreign key restrictions usually are there for a reason.

Harald




--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.

pgadmin-support by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: How to overwrite a table [only data]?
Next
From: "Aaron Bono"
Date:
Subject: Re: [SQL] How to overwrite a table [only data]?