Re: Problem with getImportedKeys / getExportedKeys

Поиск
Список
Период
Сортировка
От Vianen, Jeroen van
Тема Re: Problem with getImportedKeys / getExportedKeys
Дата
Msg-id F9926D32A30ED511B8E30050044AB52E101527@ams010.satama.com
обсуждение исходный текст
Ответ на Problem with getImportedKeys / getExportedKeys  ("Vianen, Jeroen van" <jeroen.van.vianen@satama.com>)
Ответы Re: Problem with getImportedKeys / getExportedKeys  ("Dave Cramer" <Dave@micro-automation.net>)
Re: Problem with getImportedKeys / getExportedKeys  (Jason Davies <jason@netspade.com>)
Список pgsql-jdbc
> -----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 по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: bug in PreparedStatement of JDBC in 7.2b4
Следующее
От: Ryouichi Matsuda
Дата:
Сообщение: Re: Failure in timestamptz of JDBC of 7.2b4