pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Akos Gabriel <akos.gabriel@i-logic.hu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Detect referential integrity structure
Date: Tue, 28 Jul 2009 14:08:51 -0600
Message-ID: <4A6F5AD3.1000700@gmail.com> (raw)
In-Reply-To: <20090728201240.1daff5bb@gabriel-desktop>
References: <20090728201240.1daff5bb@gabriel-desktop>

Perhaps another option:

Alter the references to ON DELETE CASCADE as seen here 
<http://www.postgresql.org/docs/8.3/static/ddl-constraints.html;


Akos Gabriel wrote:
> Hi,
>
> I've a big/complex database (Adempiere - www.adempiere.org ) where I'd
> like to delete some rows from some tables (delete a client and its
> data from the ERP database).
> All tables are in one schema (adempiere).
> There are some foreign keys/constraints.
> I've following options:
>
> - disable all constraints, doing the delete, enable all constraints.
> - find out the "right sequence" and do the delete -s.
>
> Does anyone have such an algorythm, or a method of disabling all the
> constraints? We have 8.3.7 right now. The solution will be published
> into the Adempiere wiki / contributed to the project as well.
>
> Thanks in advance,
> Akos Gabriel
>
>   



view thread (2+ messages)

Message-ID: <4A6F5AD3.1000700@gmail.com>
Permalink:  ../4A6F5AD3.1000700@gmail.com/
Also on:    postgresql.org/message-id/4A6F5AD3.1000700@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: robjsargent@gmail.com, akos.gabriel@i-logic.hu
  Subject: Re: Detect referential integrity structure
  In-Reply-To: <4A6F5AD3.1000700@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