Foreign Key

Поиск
Список
Период
Сортировка
От Bob Pawley
Тема Foreign Key
Дата
Msg-id DD4E2D20E9D14B95B31A8EA933686FC3@desktop
обсуждение исходный текст
Ответы Re: Foreign Key
Список pgsql-general
Hi
 
I don't understand what the following error means.
 
I am trying to add a foreign key to table image, that holds column device_id. This is to be controlled by column devices_id in table devices.
 
ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses (address) MATCH FULL;
 
ERROR:  insert or update on table "image" violates foreign key constraint "deviceidfk"
DETAIL:  Key (device_id)=(4022) is not present in table "devices".
 
Help appreciated.
 
Bob

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Creating indexes?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PSQL segmentation fault after setting host