pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vibhor Kumar <vibhor.aim@gmail.com>
To: Nima Ghorbany <nima.g.67@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Integrity Error
Date: Mon, 1 Nov 2010 12:50:31 +0530
Message-ID: <13139F86-6692-4C95-91C6-1452383253BE@gmail.com> (raw)
In-Reply-To: <AANLkTikp5c0xNwicLXdeF9xbsRtgvS8aX-Cgyb5RbswS@mail.gmail.com>
References: <AANLkTikp5c0xNwicLXdeF9xbsRtgvS8aX-Cgyb5RbswS@mail.gmail.com>


On Nov 1, 2010, at 12:38 PM, Nima Ghorbany wrote:

> 
> 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)=(230) is not present in table "document_directory".
> 
> i know that foreign key contraint avoid entering invalid data into a table but how can i find this key and delete it?
> 
> thanks

I think error message itself is giving the information of item_id=230

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.





view thread (2+ messages)

Message-ID: <13139F86-6692-4C95-91C6-1452383253BE@gmail.com>
Permalink:  ../13139F86-6692-4C95-91C6-1452383253BE@gmail.com/
Also on:    postgresql.org/message-id/13139F86-6692-4C95-91C6-1452383253BE@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: vibhor.aim@gmail.com, nima.g.67@gmail.com
  Subject: Re: Integrity Error
  In-Reply-To: <13139F86-6692-4C95-91C6-1452383253BE@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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