Skip site navigation (1) Skip section navigation (2)

Detect referential integrity structure

From: Akos Gabriel <akos(dot)gabriel(at)i-logic(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Detect referential integrity structure
Date: 2009-07-28 18:12:40
Message-ID: 20090728201240.1daff5bb@gabriel-desktop (view raw or flat)
Thread:
Lists: pgsql-sql
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

-- 
Üdvözlettel,
Gábriel Ákos
-=E-Mail :akos(dot)gabriel(at)i-logic(dot)hu|Web:  http://www.i-logic.hu=-
-=Tel/fax:+3612391618            |Mobil:+36209278894         =-

Responses

pgsql-sql by date

Next:From: Rob SargentDate: 2009-07-28 20:08:51
Subject: Re: Detect referential integrity structure
Previous:From: Daryl RichterDate: 2009-07-28 12:25:51
Subject: Re: sql-porting-problem oracle to postgresql with UPDATE/IS NOT NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group