Re: How to overwrite a table [only data]? - Mailing list pgsql-sql

From Aaron Bono
Subject Re: How to overwrite a table [only data]?
Date
Msg-id bf05e51c0610040755i3ed324a2y3805539b011f9024@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 pgsql-sql
On 10/4/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
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 ?

You can drop the foreign keys and then the table.  Then when you recreate and repopulate the table, you can add the foreign keys back at the very end.


==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: i have table
Next
From: Erik Jones
Date:
Subject: Re: i have table