From: Aaron Bono <postgresql@aranya.com>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgAdmin Support <pgadmin-support@postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] How to overwrite a table [only data]?
Date: Wed, 4 Oct 2006 09:55:49 -0500
Message-ID: <bf05e51c0610040755i3ed324a2y3805539b011f9024@mail.gmail.com> (raw)
In-Reply-To: <55c095e90610040440v431e15a3m34fa72ef19c239e8@mail.gmail.com>
References: <55c095e90610040440v431e15a3m34fa72ef19c239e8@mail.gmail.com>
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.comhttp://codeelixir.com
==================================================================
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgresql@aranya.com, ezequias.rocha@gmail.com, pgadmin-support@postgresql.org
Subject: Re: [SQL] How to overwrite a table [only data]?
In-Reply-To: <bf05e51c0610040755i3ed324a2y3805539b011f9024@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox