Foreign key violation

From: "Scott Ford" <Scott(dot)Ford(at)bullfrogpower(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Foreign key violation
Date: 2008-02-26 19:51:02
Message-ID: F7653F642E0F8E4F9F5D6FD8ED0159AB011E7AD6@CX43.800onemail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm getting an error from within a stored procedure being called from
Coldfusion that is telling me that a foreign key value is not present in
the parent table, but it clearly is.

This happens infrequently, but seems to continue to happen despite
restarts.

Detailed message:

EXCEPTION MESSAGE: Error Executing Database Query.
DETAIL: [Macromedia][SequeLink JDBC Driver][ODBC Socket]ERROR: insert or
update on table "entity_documentation" violates foreign key constraint
"entity_documentation_distributor_id_fkey"
Key (distributor_id)=(87) is not present in table "distributors".;
Error while executing the query
NATIVEERRORCODE: 7
SQLSTATE: 23503
QUERYERROR: [Macromedia][SequeLink JDBC Driver][ODBC Socket]ERROR:
insert or update on table "entity_documentation" violates foreign key
constraint "entity_documentation_distributor_id_fkey"
Key (distributor_id)=(87) is not present in table "distributors".;
Error while executing the query
ERRORCODE: 23503

TIA!

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nicholas Hemley 2008-02-27 12:20:52 postgres 8.3 (Centos 5.1) create tablespace problem
Previous Message Tom Lane 2008-02-26 15:24:37 Re: data type of string literal