Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9213E1337B8F for ; Mon, 1 Nov 2010 04:20:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 39799-10 for ; Mon, 1 Nov 2010 07:20:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 497F41337B8E for ; Mon, 1 Nov 2010 04:20:39 -0300 (ADT) Received: by pwj3 with SMTP id 3so1219706pwj.19 for ; Mon, 01 Nov 2010 00:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=80UIONgC6E6bRSuYYQDBEECAJgYvrxM1QMzWRUtmNRw=; b=F+MJF3jxr3RiKrRkNx1tthS3RNTdVsmIV6lqybVeBD9lEe5oC8tQClmrp6DO2Xfyrl J2e3U4TstEEuDtJ/sTpX4DxSBeaUN4g+eKWvbDWP+PY3uylJ2f3OlW2HucQ84H27mw6v MbkGvTKPf3rLKi3fLBesb18OqzpUSRf/0KPvw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=BOHoJYjp/n89ZFkIzXEsVV6t8FOhNlPUvBIrh1MZgn+MgxIvK6RDvW10sm7f74Hxbz VjsFPEepQSQ+aR/xz7EvYZ5W/Rj2jWEs8Cg8k6RsO4tVjwOFPUNg181vJ2oZqmLSYMuq wGHbSTn1tGmtjFkjJqMF0rFnzTrHzHrADT/EM= Received: by 10.142.88.8 with SMTP id l8mr3728459wfb.245.1288596038878; Mon, 01 Nov 2010 00:20:38 -0700 (PDT) Received: from [192.168.1.2] ([122.169.75.209]) by mx.google.com with ESMTPS id w22sm8342314wfd.7.2010.11.01.00.20.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 00:20:37 -0700 (PDT) Subject: Re: Integrity Error Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Vibhor Kumar In-Reply-To: Date: Mon, 1 Nov 2010 12:50:31 +0530 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <13139F86-6692-4C95-91C6-1452383253BE@gmail.com> References: To: Nima Ghorbany X-Mailer: Apple Mail (2.1081) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/2 X-Sequence-Number: 35968 On Nov 1, 2010, at 12:38 PM, Nima Ghorbany wrote: >=20 > hello guys, > i am using openerp which uses postgres as its database .when i do some = database changes in openerp i get this error which is a reflection of = postgres internall error.do u have any idea what does it mean? > Error: "document_directory_group_rel" violates foreign key constraint = "document_directory_group_rel_item_id_fkey" > DETAIL: Key (item_id)=3D(230) is not present in table = "document_directory". >=20 > i know that foreign key contraint avoid entering invalid data into a = table but how can i find this key and delete it? >=20 > thanks I think error message itself is giving the information of item_id=3D230 Since parent table "document_director" does not have this value = therefore it's not allowing to insert the values in table = document_directory_group_rel. Thanks & Regards, Vibhor Kumar (PCP & OCP) ITIL V3 Cerftified.