Re: Adding foreign keys - Mailing list pgadmin-support

From Andreas Pflug
Subject Re: Adding foreign keys
Date
Msg-id 41E80A76.9070204@pse-consulting.de
Whole thread Raw
In response to Adding foreign keys  (Trent Oliphant <trentoliphant@yahoo.com>)
Responses Re: Adding foreign keys
List 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 by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: adding column with sequence
Next
From: KÖPFERL Robert
Date:
Subject: Re: Pg-admin 1.3 doesn't find a resource on Win