pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDetect referential integrity structure
2+ messages / 2 participants
[nested] [flat]
* Detect referential integrity structure
@ 2009-07-28 18:12 Akos Gabriel <akos.gabriel@i-logic.hu>
2009-07-28 20:08 ` Re: Detect referential integrity structure Rob Sargent <robjsargent@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Akos Gabriel @ 2009-07-28 18:12 UTC (permalink / raw)
To: 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.gabriel@i-logic.hu|Web: http://www.i-logic.hu=-
-=Tel/fax:+3612391618 |Mobil:+36209278894 =-
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Detect referential integrity structure
2009-07-28 18:12 Detect referential integrity structure Akos Gabriel <akos.gabriel@i-logic.hu>
@ 2009-07-28 20:08 ` Rob Sargent <robjsargent@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Rob Sargent @ 2009-07-28 20:08 UTC (permalink / raw)
To: Akos Gabriel <akos.gabriel@i-logic.hu>; +Cc: pgsql-sql
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
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-07-28 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28 18:12 Detect referential integrity structure Akos Gabriel <akos.gabriel@i-logic.hu>
2009-07-28 20:08 ` Rob Sargent <robjsargent@gmail.com>
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