Re: Foreign key

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Foreign key
Дата
Msg-id 20050327163328.GG9280@wolff.to
обсуждение исходный текст
Ответ на Foreign key  (<ASAKALAL@bouyguestelecom.fr>)
Список pgsql-sql
On Fri, Mar 25, 2005 at 16:31:16 +0100, ASAKALAL@bouyguestelecom.fr wrote:
> 
> When i add table with foreign key in my database, this error return : <
> number of referencing and referenced colums for foreign key disagree>.
> 
> How resolve this problem ?

Besides what Mike said, one other thing to remember is that if you don't
specify columns in the referenced table, the primary key of that table
is used, NOT columns with names matching those of the referencing table.

In cases like this it have helped if you had copied and pasted an example
displaying the problem in addition to the error message.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgre: 8.0.1 Create Table insde a function gives strange error at execution time
Следующее
От: Mike Rylander
Дата:
Сообщение: Re: detaching triggers