Re: Integrity Error

From: Vibhor Kumar <vibhor(dot)aim(at)gmail(dot)com>
To: Nima Ghorbany <nima(dot)g(dot)67(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Integrity Error
Date: 2010-11-01 07:20:31
Message-ID: 13139F86-6692-4C95-91C6-1452383253BE@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dragos Valentin Moinescu 2010-11-01 12:45:31 plpgsql: some 'DELETE' queries are returning ROWCOUNT = 0
Previous Message Nima Ghorbany 2010-11-01 07:08:07 Integrity Error