Foreign Key Dialog: Disabled "Add" Button

From: Ryan Adams <radams(at)csail(dot)mit(dot)edu>
To: pgadmin-support(at)postgresql(dot)org
Subject: Foreign Key Dialog: Disabled "Add" Button
Date: 2004-04-08 15:23:31
Message-ID: 1081437811.20087.18.camel@quintana
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


I am attempting to add a table with a foreign key referencing the
primary key of another table in the same schema. When I try to add the
foreign key constraint, the Add button under the Columns tab is always
disabled. I must be doing something incorrectly, and I'd like an idea
as what I need to change. I am using pgAdmin III 1.02 under Linux.

For example, if I have a table:

CREATE TABLE development.referenced
(
id int4 NOT NULL,
CONSTRAINT referenced_id_pkey PRIMARY KEY (id)
) WITHOUT OIDS;

And another table:

CREATE TABLE development.referencer
(
referenced int4 NOT NULL
) WITHOUT OIDS;

I could like to add the constraint that
development.referencer.referenced is a foreign key to the other table.
I can do so in psql with:

ALTER TABLE development.referencer ADD FOREIGN KEY (referenced)
REFERENCES development.referenced (id);

I can't do this using the dialogs in pgAdmin III, however. Any ideas
why?

Thanks in advance...

Ryan Adams

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2004-04-09 18:42:14 Re: PgMigration with PgAdmin2
Previous Message Luis Carlos B.V. 2004-04-07 21:32:12 PgMigration with PgAdmin2