Re: Finding exact column type via java.sql.ResultSetMetaData

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Finding exact column type via java.sql.ResultSetMetaData
Дата
Msg-id alpine.BSO.2.00.1302141206480.23041@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Finding exact column type via java.sql.ResultSetMetaData  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc

On Thu, 14 Feb 2013, Dave Cramer wrote:

> Yes, you are correct.  The backend does not provide that information
>

No, the backend does provide the OID of the returned column type.  So
internally we can tell the difference between the two types in different
schemas.  The issue is how to return this information to the user.
ResultSetMetaData.getColumnTypeName doesn't have a corresponding
getColumnTypeSchema so we'd have to qualify the returned value.  The
javadoc says we should in certain circumstances:

Returns:
    type name used by the database. If the column type is a user-defined
type, then a fully-qualified type name is returned.

I'm concerned that doing this would break things for more users than it
would help because different types with the same name is a rarity.  So
we'd probably need an option to enable/disable this.

Kris Jurka

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Finding exact column type via java.sql.ResultSetMetaData
Следующее
От: dmp
Дата:
Сообщение: Re: rounded brackets in prepared statement