Re: foreign key violation

Поиск
Список
Период
Сортировка
От Vijay Deval
Тема Re: foreign key violation
Дата
Msg-id 3AD32CDE.883CF2A2@giaspn01.vsnl.net.in
обсуждение исходный текст
Ответ на foreign key violation  (Larry Holish <ljholish@speakeasy.net>)
Список 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 по дате отправления:

Предыдущее
От: Don Miller
Дата:
Сообщение: Re: No echo on psql command - never mind...
Следующее
От: "Williams, Ryan"
Дата:
Сообщение: Version info?