Re: Adding foreign keys

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: Adding foreign keys
Дата
Msg-id 41E80A76.9070204@pse-consulting.de
обсуждение исходный текст
Ответ на Adding foreign keys  (Trent Oliphant <trentoliphant@yahoo.com>)
Ответы Re: Adding foreign keys  (Trent Oliphant <trentoliphant@yahoo.com>)
Список pgadmin-support
Trent Oliphant wrote:
> The add constraint foreign key dialog does not appear
> to be working correctly.   It doesn't offer any column
> choices in the 'referencing' drop down box in the
> columns tab.  I have a table selected that has the
> primary key column I am trying to reference.

I can't reproduce this. This sounds like what happens when the tables 
don't have pks.

> Also, if I want to create a foreign key that
> references the primary key in the same table
> ('child_of' type columns), I am not able to do a self
> reference to the table untill after it has been fully
> created.

This is by design, only already existent tables can be selected at 
creation time.

Although it's perfectly legal, self references might lead to trouble 
under some maintenance circumstances, so I'd recommend to avoid them.

Regards,
Andreas


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

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: adding column with sequence
Следующее
От: KÖPFERL Robert
Дата:
Сообщение: Re: Pg-admin 1.3 doesn't find a resource on Win