Re: Adding foreign keys

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Trent Oliphant <trentoliphant(at)yahoo(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Adding foreign keys
Date: 2005-01-14 18:07:50
Message-ID: 41E80A76.9070204@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message KÖPFERL Robert 2005-01-14 18:27:34 Re: Pg-admin 1.3 doesn't find a resource on Win
Previous Message Andreas Pflug 2005-01-14 18:02:00 Re: adding column with sequence