pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
disable constrained (contd.)
2+ messages / 2 participants
[nested] [flat]

* disable constrained (contd.)
@ 2004-08-22 00:41 Roman Kunert <rkunert@yobe.org>
  2004-08-23 11:51 ` Re: disable constrained (contd.) Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Roman Kunert @ 2004-08-22 00:41 UTC (permalink / raw)
  To: pgsql-sql

I just wanted to know if there is an update to the topic

http://archives.postgresql.org/pgsql-sql/2003-02/msg00624.php

I am also looking for an easy way to disable foreign key constraint 
check while importing data from one database to PostgreSQL. The one 
suggested method (see link above) that modifies pg_catalog.pg_class is 
not preferrable, as it requires super user rights, the other one that 
works by dropping the foreign key, doing the inserts and then adding it 
back again does not seem to work, as it results in an constraint check 
error when I execute the ADD statement (it complains about the reference 
to a row in another table that has not been imported yet, but will be 
later during the import)

any news on this? thanks.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: disable constrained (contd.)
  2004-08-22 00:41 disable constrained (contd.) Roman Kunert <rkunert@yobe.org>
@ 2004-08-23 11:51 ` Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Markus Bertheau @ 2004-08-23 11:51 UTC (permalink / raw)
  To: Roman Kunert <rkunert@yobe.org>; +Cc: pgsql-sql

В Вск, 22.08.2004, в 02:41, Roman Kunert пишет:

> I am also looking for an easy way to disable foreign key constraint 
> check while importing data from one database to PostgreSQL. The one 
> suggested method (see link above) that modifies pg_catalog.pg_class is 
> not preferrable, as it requires super user rights, the other one that 
> works by dropping the foreign key, doing the inserts and then adding it 
> back again does not seem to work, as it results in an constraint check 
> error when I execute the ADD statement (it complains about the reference 
> to a row in another table that has not been imported yet, but will be 
> later during the import)

Add the constraint when you're done importing all data.

-- 
Markus Bertheau <twanger@bluetwanger.de>




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-08-23 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-22 00:41 disable constrained (contd.) Roman Kunert <rkunert@yobe.org>
2004-08-23 11:51 ` Markus Bertheau <twanger@bluetwanger.de>

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