Re: [SQL] How to overwrite a table [only data]?

From: "Aaron Bono" <postgresql(at)aranya(dot)com>
To: "Ezequias Rodrigues da Rocha" <ezequias(dot)rocha(at)gmail(dot)com>
Cc: "pgAdmin Support" <pgadmin-support(at)postgresql(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] How to overwrite a table [only data]?
Date: 2006-10-04 14:55:49
Message-ID: bf05e51c0610040755i3ed324a2y3805539b011f9024@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-sql

On 10/4/06, Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)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
==================================================================

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2006-10-04 15:13:27 Re: pgAdmin III v1.6 Beta 1 - Pg-8.2beta1: Grid editor problem
Previous Message Alexander Kirpa 2006-10-04 14:49:43 pgAdmin III v1.6 Beta 1 - Pg-8.2beta1: Grid editor problem

Browse pgsql-sql by date

  From Date Subject
Next Message Erik Jones 2006-10-04 15:37:03 Re: i have table
Previous Message Aaron Bono 2006-10-04 14:54:28 Re: i have table