Re: BUG #2644: pgadmin III foreign key

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <massicitte(at)libero(dot)it>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #2644: pgadmin III foreign key
Date: 2006-09-28 15:11:40
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E40176D14A@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

OK.

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

OK, done here.

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

I see test1 and test2 when I select the referenced table.

> When you restore the backup on a template0 inherited db ,
> drop the schema public.

I have.

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

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
> 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
---------------------------

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

Browse pgsql-bugs by date

  From Date Subject
Next Message Harry Hehl 2006-09-28 16:54:53 BUG #2661: select time with time zone not converting
Previous Message Dave Page 2006-09-28 10:17:58 Re: BUG #2644: pgadmin III foreign key