X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9FC775E4761 for ; Mon, 23 Aug 2004 08:52:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65519-08 for ; Mon, 23 Aug 2004 11:52:04 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id AC3B95E3F15 for ; Mon, 23 Aug 2004 08:52:02 -0300 (ADT) Received: from [62.165.4.166] (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i7NBpwg20908; Mon, 23 Aug 2004 13:51:59 +0200 Subject: Re: disable constrained (contd.) From: Markus Bertheau To: Roman Kunert Cc: pgsql-sql@postgresql.org In-Reply-To: <4127EBBF.2040405@yobe.org> References: <4127EBBF.2040405@yobe.org> Content-Type: text/plain; charset=UTF-8 Message-Id: <1093261912.2647.10.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 23 Aug 2004 13:51:53 +0200 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/242 X-Sequence-Number: 18739 =D0=92 =D0=92=D1=81=D0=BA, 22.08.2004, =D0=B2 02:41, Roman Kunert =D0=BF=D0= =B8=D1=88=D0=B5=D1=82: > I am also looking for an easy way to disable foreign key constraint=20 > check while importing data from one database to PostgreSQL. The one=20 > suggested method (see link above) that modifies pg_catalog.pg_class is=20 > not preferrable, as it requires super user rights, the other one that=20 > works by dropping the foreign key, doing the inserts and then adding it= =20 > back again does not seem to work, as it results in an constraint check=20 > error when I execute the ADD statement (it complains about the reference= =20 > to a row in another table that has not been imported yet, but will be=20 > later during the import) Add the constraint when you're done importing all data. --=20 Markus Bertheau