Re: [PATCH] problem with DatabaseMetaData and mixed case table

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [PATCH] problem with DatabaseMetaData and mixed case table
Дата
Msg-id 42F7D795.3050707@opencloud.com
обсуждение исходный текст
Ответ на [PATCH] problem with DatabaseMetaData and mixed case table names  (Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>)
Список pgsql-jdbc
Giuseppe Sacco wrote:

> The solution I propose is, since it seems that postgresql always store
> relation names in lowercase letters, to change the jdbc implementation
> of all methods like «getPrimaryKeys» in order to pass lowercase relation
> names to the backend.

This assumption is wrong. PostgreSQL stores mixed case identifiers, but
if you do not quote them then they are forced to lowercase during
parsing. If you want to preserve case, quote your identifiers. See
http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

> Is this the right way to solve the problem?

No. It's valid to have tables called "foo", "Foo", and "FOO" (possibly
simultaneously); your patch would destroy the ability to examine
anything but "foo".

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: get question mark with Chinese/Japanese character ?
Следующее
От: Giuseppe Sacco
Дата:
Сообщение: Re: [PATCH] problem with DatabaseMetaData and mixed case