Re: Problem with getImportedKeys / getExportedKeys - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Problem with getImportedKeys / getExportedKeys
Date
Msg-id 023a01c19dc9$c03d6180$c201a8c0@inspiron
Whole thread Raw
In response to Re: Problem with getImportedKeys / getExportedKeys  ("Vianen, Jeroen van" <jeroen.van.vianen@satama.com>)
List pgsql-jdbc
So the big question is?

How should postgres be handling this? Should we do a case-insensitive
search?

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Vianen, Jeroen van
Sent: Tuesday, January 15, 2002 3:50 AM
To: 'Jason Davies'; Vianen, Jeroen van
Cc: PostgreSQL JDBC
Subject: Re: [JDBC] Problem with getImportedKeys / getExportedKeys


> -----Original Message-----
> From: Jason Davies [mailto:jason@netspade.com]
> Sent: Monday, January 14, 2002 21:12
> To: Vianen, Jeroen van
> Cc: PostgreSQL JDBC
> Subject: Re: [JDBC] Problem with getImportedKeys / getExportedKeys
>
>
> Hi,
>
> I noticed a couple of things. First of all, there is a small
> bug in the code which can be easily fixed. The other thing is
> that your program converts table names to uppercase. I've
> written the code so it is expecting case-sensitive names.
> Should this be changed - I'm not up to date on whether things
> should all be converted to lowercase or not- ? Once this is
> resolved I'll issue a patch :-)

Oh, that was to get it working on Oracle :-( But glad you pointed it
out, 'cause the output is way different now:

PostgreSQL says:

# java -classpath jdbc7.2dev-1.2.jar:. TestKeys users
Imported keys:
PKTABLE_NAME = users_roles
PKCOLUMN_NAME = userid
FKTABLE_NAME = users
FKCOLUMN_NAME = userid
Exported keys:

# java -classpath jdbc7.2dev-1.2.jar:. TestKeys users_roles Imported
keys: Exported keys: PKTABLE_NAME = users_roles PKCOLUMN_NAME = userid
FKTABLE_NAME = users FKCOLUMN_NAME = userid PKTABLE_NAME = users_roles
PKCOLUMN_NAME = userid FKTABLE_NAME = users FKCOLUMN_NAME = userid


Whereas Oracle says:

# java -classpath classes12.zip:. TestKeys USERS
Imported keys:
Exported keys:
PKTABLE_NAME = USERS
PKCOLUMN_NAME = USERID
FKTABLE_NAME = USERS_ROLES
FKCOLUMN_NAME = USERID

# java -classpath classes12.zip:. TestKeys USERS_ROLES
Imported keys:
PKTABLE_NAME = ROLES
PKCOLUMN_NAME = ROLENAME
FKTABLE_NAME = USERS_ROLES
FKCOLUMN_NAME = ROLENAME
PKTABLE_NAME = USERS
PKCOLUMN_NAME = USERID
FKTABLE_NAME = USERS_ROLES
FKCOLUMN_NAME = USERID
Exported keys:


The new TestKeys.java is attached.

Cheers,


Jeroen



pgsql-jdbc by date:

Previous
From: "Vianen, Jeroen van"
Date:
Subject: Re: Problem with getImportedKeys / getExportedKeys
Next
From: Tom Lane
Date:
Subject: Re: Explicit typing of numeric types