From: | "Vianen, Jeroen van" <jeroen(dot)van(dot)vianen(at)satama(dot)com> |
---|---|
To: | "'Jason Davies'" <jason(at)netspade(dot)com>, "Vianen, Jeroen van" <jeroen(dot)van(dot)vianen(at)satama(dot)com> |
Cc: | PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Problem with getImportedKeys / getExportedKeys |
Date: | 2002-01-15 08:49:52 |
Message-ID: | F9926D32A30ED511B8E30050044AB52E101527@ams010.satama.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
> -----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
Attachment | Content-Type | Size |
---|---|---|
TestKeys.java | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ryouichi Matsuda | 2002-01-15 10:41:31 | Re: Failure in timestamptz of JDBC of 7.2b4 |
Previous Message | Barry Lind | 2002-01-15 07:46:45 | Re: bug in PreparedStatement of JDBC in 7.2b4 |