Re: foreign key violation - Mailing list pgsql-novice

From Vijay Deval
Subject Re: foreign key violation
Date
Msg-id 3AD32CDE.883CF2A2@giaspn01.vsnl.net.in
Whole thread Raw
In response to foreign key violation  (Larry Holish <ljholish@speakeasy.net>)
List pgsql-novice
If you put condition

WHERE primery key from ref. table= its mirror in temp table, the inserts
should  go through.

if objective is to find out the rows,  NOT EXISTS could be used on temp and
ref. table

Vijay

Larry Holish wrote:

> Hello,
>
> I am inserting rows from a temp table into table A using INSERT INTO.
> Table A has a foreign key referencing table B's primary key.  I get
> the following error:
>
> <unnamed> referential integrity violation - key referenced from table
> A not found in table B
>
> Is there a way to tell which row(s) is causing the problem?  I am
> using ver. 7.02. Thanks in advance,
>
> --
> Larry Holish
> <ljholish@speakeasy.net>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster



pgsql-novice by date:

Previous
From: Don Miller
Date:
Subject: Re: No echo on psql command - never mind...
Next
From: "Williams, Ryan"
Date:
Subject: Version info?