Re: Problem with REFERENCES on INHERITS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with REFERENCES on INHERITS
Дата
Msg-id 15673.1422889861@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with REFERENCES on INHERITS  (William Gordon Rutherdale <will.rutherdale@utoronto.ca>)
Ответы Re: Problem with REFERENCES on INHERITS  (William Gordon Rutherdale <will.rutherdale@utoronto.ca>)
Список pgsql-general
William Gordon Rutherdale <will.rutherdale@utoronto.ca> writes:
> So this statement:
> INSERT INTO banana_stash(primate_id, qty) VALUES (1, 17);
> Resulted in this error:
> ERROR:  insert or update on table "banana_stash" violates foreign key
> constraint "banana_stash_primate_id_fkey"
> DETAIL:  Key (primate_id)=(1) is not present in table "primate".

> How am I to interpret this?  A select * from primate shows that a row
> with primate.id exists, yet the error message indicates that it doesn't.

If you did "select * from only primate" you would see that there is no
such row in the parent table, which is what the foreign key is being
enforced against.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: theftp
Дата:
Сообщение: Re: BDR Error restarted
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: cannot start 9.3 after system crash