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

Re: disable constrained (contd.)

From: Markus Bertheau <twanger(at)bluetwanger(dot)de>
To: Roman Kunert <rkunert(at)yobe(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: disable constrained (contd.)
Date: 2004-08-23 11:51:53
Message-ID: 1093261912.2647.10.camel@dicaprio.akademie1.de (view raw or flat)
Thread:
Lists: 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(at)bluetwanger(dot)de>


In response to

pgsql-sql by date

Next:From: John DeSoiDate: 2004-08-23 13:36:08
Subject: Re: sleep function
Previous:From: Markus BertheauDate: 2004-08-23 11:50:35
Subject: Re: array_in: '{}}'::text[]

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