This is a discussion on How to overwrite a table [only data]? within the pgsql Interfaces Pgadmin Support forums, part of the PostgreSQL category; --> Hi list, I would like to overwrite a table with problem with his original. But there are some points. ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi list, 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 ? Regards... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ |
| ||||
| 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. |
| Thread Tools | |
| Display Modes | |
|
|