Re: Problem with getImportedKeys / getExportedKeys

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: "'Vianen, Jeroen van'" <jeroen(dot)van(dot)vianen(at)satama(dot)com>, "'Jason Davies'" <jason(at)netspade(dot)com>
Cc: "'PostgreSQL JDBC'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problem with getImportedKeys / getExportedKeys
Date: 2002-01-15 13:37:17
Message-ID: 023a01c19dc9$c03d6180$c201a8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)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(at)netspade(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vianen, Jeroen van 2002-01-15 13:47:25 Re: Problem with getImportedKeys / getExportedKeys
Previous Message Alaric B. Snell 2002-01-15 10:42:30 Explicit typing of numeric types