Re: BUG #2644: pgadmin III foreign key - Mailing list pgsql-bugs

From Dave Page
Subject Re: BUG #2644: pgadmin III foreign key
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E40176D14A@ratbert.vale-housing.co.uk
Whole thread Raw
In response to BUG #2644: pgadmin III foreign key  ("Massimiliano Citterio" <massicitte@libero.it>)
List pgsql-bugs
=20

> -----Original Message-----
> From: massicitte@libero.it [mailto:massicitte@libero.it]=20
> Sent: 28 September 2006 15:08
> To: Dave Page
> Subject: RE: [BUGS] BUG #2644: pgadmin III foreign key
>=20
> This is a backup of the test db with the problem...
>=20
> I generate it all with pgAdmin  without SQLcode.

OK.

> I create  the database with "New Database" and so on

OK, done here.
=20
> When I Arrive to "New object" - "New foreign key"=20=20
> i can not complete the task because i have no recerencing=20
> column to choose from.

I see test1 and test2 when I select the referenced table.
=20
> When you restore the backup on a template0 inherited db ,=20
> drop the schema public.

I have.

> It know that it could be stupid to drop the public schema but=20
> Some development platform like Sybase Powerbuilder refer to=20
> user schema  and not to public schema... so Someone could=20
> think of dropping public schema...=20

No, there's no reason to keep public if you don't need it. It's
primarily there foe backwards compatibility.

> To see the problem you have to disconnect an reconnect Before=20
> doing New foreign key.

I have done. pgAdmin allows me to define the foreign key from table1 to
table2, but upon clicking OK, gives the following error:

---------------------------
pgAdmin III
---------------------------
An error has occured:

ERROR:  there is no unique constraint matching given keys for referenced
table "test2"

---------------------------
OK=20=20=20
---------------------------

Which is exactly what I'd expect. In my previous testing, I defined
primary keys so that wasn't an issue. Can anyone else reproduce this
problem?

Regards, Dave=20

pgsql-bugs by date:

Previous
From: "Dave Page"
Date:
Subject: Re: BUG #2644: pgadmin III foreign key
Next
From: "Harry Hehl"
Date:
Subject: BUG #2662: pg_dump out cannot be retored