> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match