dbTalk Databases Forums  

[BUGS] BUG #2644: pgadmin III foreign key

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2644: pgadmin III foreign key in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Massimiliano Citterio
 
Posts: n/a

Default [BUGS] BUG #2644: pgadmin III foreign key - 09-24-2006 , 04:15 PM







The following bug has been logged online:

Bug reference: 2644
Logged by: Massimiliano Citterio
Email address: massicitte (AT) libero (DOT) it
PostgreSQL version: 8.1.4
Operating system: Windows 2003
Description: pgadmin III foreign key
Details:

The referencing column dropdown listbox not filled with fields from
referenced table.

The case appear after doing the following actions.

Create a schema named like $user (ex. "postgres").
Delete Schema "Public".
Refresh the Database View...
Now the default Schema for the database is "postgres"

create tables, the try to create foreign keys using the GUI.
There is no way.

If you create a new schema "public" it does not works.

If you create a new schema "public" and rename the "postgres" schema to
something else the it works.

If you drop schema "postgres" create schema "public" and then recreate
schema postgres and his tables, then foreign key GUI works.

May be the GUI search for schema "public" but it must have an OID lesser of
all other schemas in the searchpath.

Infact the default search path is $user, public.

By the way it does not work if a schema named public does not exist.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Dave Page
 
Posts: n/a

Default Re: [BUGS] BUG #2644: pgadmin III foreign key - 09-25-2006 , 09:02 AM






=20

Quote:
-----Original Message-----
From: pgsql-bugs-owner (AT) postgresql (DOT) org=20
[mailtogsql-bugs-owner (AT) postgresql (DOT) org] On Behalf Of=20
Massimiliano Citterio
Sent: 22 September 2006 09:21
To: pgsql-bugs (AT) postgresql (DOT) org
Subject: [BUGS] BUG #2644: pgadmin III foreign key
=20
=20
The following bug has been logged online:
=20
Bug reference: 2644
Logged by: Massimiliano Citterio
Email address: massicitte (AT) libero (DOT) it
PostgreSQL version: 8.1.4
Operating system: Windows 2003
Description: pgadmin III foreign key
Details:=20
=20
The referencing column dropdown listbox not filled with fields from
referenced table.
=20
The case appear after doing the following actions.
=20
Create a schema named like $user (ex. "postgres").
Delete Schema "Public".
Refresh the Database View...
Now the default Schema for the database is "postgres"
=20
create tables, the try to create foreign keys using the GUI.
There is no way.
=20
If you create a new schema "public" it does not works.
=20
If you create a new schema "public" and rename the "postgres"=20
schema to
something else the it works.
=20
If you drop schema "postgres" create schema "public" and then recreate
schema postgres and his tables, then foreign key GUI works.
=20
May be the GUI search for schema "public" but it must have an=20
OID lesser of
all other schemas in the searchpath.
=20
Infact the default search path is $user, public.
=20
By the way it does not work if a schema named public does not exist.
I cannot reproduce this in the 1.6 development code - can you test beta
1 please?

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


Reply With Quote
  #3  
Old   
Dave Page
 
Posts: n/a

Default Re: [BUGS] BUG #2644: pgadmin III foreign key - 09-28-2006 , 05:19 AM



=20

Quote:
-----Original Message-----
From: massicitte (AT) libero (DOT) it [mailto:massicitte (AT) libero (DOT) it]=20
Sent: 27 September 2006 17:09
To: Dave Page
Subject: RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
---------- Initial Header -----------
=20
From : "Dave Page" dpage (AT) vale-housing (DOT) co.uk
To : massicitte (AT) libero (DOT) it
Cc :=20
Date : Tue, 26 Sep 2006 17:03:18 +0100
Subject : RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
=20
OK thank you.=20
I try Version 1.6 beta 1 and I find very good improvements but
I'm sorry Foreign key wizard still do not work properly.
=20
Access the db with user postgres;
Create DB test;
create schema postgres;
drop schema public;
Disconnect;
Access the db with user postgres;
create table1;
create table2;
=20
=20
create foreign key on table1 for table2 does not work with=20
GUI, you need to write the SQL CODE.
That works perfectly for me. Are you trying to reference properly
indexed columns? What do your table definitions look like?


Quote:
I download the sources, if i have time i will search where is=20
the problem.
OK, thanks.=20

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #4  
Old   
Dave Page
 
Posts: n/a

Default Re: [BUGS] BUG #2644: pgadmin III foreign key - 09-28-2006 , 10:12 AM



=20

Quote:
-----Original Message-----
From: massicitte (AT) libero (DOT) it [mailto:massicitte (AT) libero (DOT) 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.

Quote:
I create the database with "New Database" and so on
OK, done here.
=20
Quote:
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
Quote:
When you restore the backup on a template0 inherited db ,=20
drop the schema public.
I have.

Quote:
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.

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

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


Reply With Quote
  #5  
Old   
Dave Page
 
Posts: n/a

Default Re: [BUGS] BUG #2644: pgadmin III foreign key - 09-29-2006 , 03:14 AM



=20

Quote:
-----Original Message-----
From: massicitte (AT) libero (DOT) it [mailto:massicitte (AT) libero (DOT) it]=20
Sent: 28 September 2006 18:37
To: Dave Page
Subject: RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
---------- Initial Header -----------
=20
From : "Dave Page" dpage (AT) vale-housing (DOT) co.uk
To : massicitte (AT) libero (DOT) it
Cc : pgsql-bugs (AT) postgresql (DOT) org
Date : Thu, 28 Sep 2006 16:11:40 +0100
Subject : RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
=20
=20
I try installing on another PC, because I do not arrive to=20
that error. I really can not see the fields from table2 into=20
the foreign key wizard, if I previously drop public schema.
Oh, I don't disbelieve you - there must be something else affecting
things in your setup that doesn't affect mine. What PostgreSQL version
are you running on?

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #6  
Old   
Dave Page
 
Posts: n/a

Default Re: [BUGS] BUG #2644: pgadmin III foreign key - 09-29-2006 , 05:21 AM



=20

Quote:
-----Original Message-----
From: massicitte (AT) libero (DOT) it [mailto:massicitte (AT) libero (DOT) it]=20
Sent: 29 September 2006 11:10
To: Dave Page
Subject: RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
---------- Initial Header -----------
=20
From : "Dave Page" dpage (AT) vale-housing (DOT) co.uk
To : massicitte (AT) libero (DOT) it
Cc : pgsql-bugs (AT) postgresql (DOT) org
Date : Fri, 29 Sep 2006 09:14:14 +0100
Subject : RE: [BUGS] BUG #2644: pgadmin III foreign key
=20
I try 8.1.4 and 7.4.7 Servers
=20
On Windows 2003 server and Fedora core2 linux Server
I've been testing on 8.1.4 (win32), 8.0.7 (slackware linux) and 8.2 beta
1 (win32).
=20
Quote:
and I try PgAdmin 1.4.3 on WinXp and Win2000 systems
and PgAdmin 1.6 beta 1 on WinXp system
Although I did try 1.4.3 earlier, I'm working on 1.6 mainly.

Quote:
All combinations, the same results

All system are in Italian language
PgAdmin is in english
=20
I have some problems to load Sources with Dev C++ 4.9.9.2
I'm searching for A Setup of MS VC++ 6.0 to load the sources.
Use the 1.6 SVN trunk code (or a recent snapshot) with Visual C++ 2005
Express which is now a free download from Microsoft. The build
environment is documented at http://www.pgadmin.org/download/source.php

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.