pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Harald Armin Massa <haraldarminmassa@gmail.com>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgAdmin Support <pgadmin-support@postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to overwrite a table [only data]?
Date: Wed, 4 Oct 2006 13:50:36 +0200
Message-ID: <7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@mail.gmail.com> (raw)
In-Reply-To: <55c095e90610040440v431e15a3m34fa72ef19c239e8@mail.gmail.com>
References: <55c095e90610040440v431e15a3m34fa72ef19c239e8@mail.gmail.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.

view thread (4+ messages)  latest in thread

Message-ID: <7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@mail.gmail.com>
Permalink:  ../7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@mail.gmail.com/
Also on:    postgresql.org/message-id/7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@mail.gmail.com

 · 

reply

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: haraldarminmassa@gmail.com, ezequias.rocha@gmail.com, pgadmin-support@postgresql.org
  Subject: Re: How to overwrite a table [only data]?
  In-Reply-To: <7be3f35d0610040450v2cf4ea3cm24629e3caa925f9d@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