Foreign Key Dialog: Disabled "Add" Button - Mailing list pgadmin-support

From Ryan Adams
Subject Foreign Key Dialog: Disabled "Add" Button
Date
Msg-id 1081437811.20087.18.camel@quintana
Whole thread Raw
List 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




pgadmin-support by date:

Previous
From: "Santhosh"
Date:
Subject: Fw: tips pls.
Next
From: "Luis Carlos B.V."
Date:
Subject: PgMigration with PgAdmin2