Object types and ResultSets (java.sql.Struct)

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Object types and ResultSets (java.sql.Struct)
Дата
Msg-id hjf8o6$m49$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: Object types and ResultSets (java.sql.Struct)  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Hi,

I noticed that "object types" are not treated in a consistent manner

Taking the following table:

CREATE TYPE person_type AS
(
   first_name VARCHAR(20),
   last_name VARCHAR(25)
)

CREATE TABLE contacts
(
    id integer,
    contact person_type
)

DatabaseMetaData.getColumns() will return a java.sql.Types.STRUCT for the column "contact".
That seems to be correct to me - at least this is what I expected ;)

When running a "SELECT * FROM contacts", ResultSetMetaData.getColumnType() will return java.sql.Types.OTHER  (for the
contactcolumn) 

This seems to be inconsistent to me.

My expectation was that ResultSetMetaData.getColumnType() should also return java.sql.Types.STRUCT and that the object
returnedby getObject() on the ResultSet should implement java.sql.Struct (which it doesn't) 


Regards
Thomas

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: How to use JDBC to update LargeObject
Следующее
От: Juergen Weber
Дата:
Сообщение: Add XATMI C API