Re: 7.1.2 ERROR: UNIQUE constraint matching given keys for referenced table ......

Поиск
Список
Период
Сортировка
От lbayuk@mindspring.com (ljb)
Тема Re: 7.1.2 ERROR: UNIQUE constraint matching given keys for referenced table ......
Дата
Msg-id 9h8nk4$2uf3$1@news.tht.net
обсуждение исходный текст
Список pgsql-general
Lincy.Lin@LinuxInBox.Com wrote:
>HI !
>
>    Does anyone know what's my problem and how to resolve it ? Thanks.
>...
>>     Create Table DepartmentInfo
>>         (
>>...
>>             Department                Char(40)        Default ''
>>         );
>>...
>>     Create Table EmployeeInfo
>>         (
>>...
>>             Department            Char(40)        References
>> DepartmentInfo    (Department)
>>...
>>     ERROR:    UNIQUE constraint matching given keys for referenced table
>> "departmentinfo" not found

Make DepartmentInfo.Department a primary key. If not possible, make a
unique constraint on it. If it isn't unique, you shouldn't be referencing
it as a foreign key from EmployeeInfo.

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

Предыдущее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: RE: Red Hat to support PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql 7.1.2 server hanging...