Re: Accessing BIT(n) type from Java

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: Accessing BIT(n) type from Java
Дата
Msg-id 3E0B4FD2.8030309@xythos.com
обсуждение исходный текст
Ответ на Accessing BIT(n) type from Java  (Petr Andrs <xtonda-konf@quick.cz>)
Ответы Re: Accessing BIT(n) type from Java  (Petr Andrs <xtonda-konf@quick.cz>)
Список pgsql-jdbc
Petr,

There currently isn't support for the bit(n) datatype.  This is
primarily due to the fact the the jdbc spec (at least from my reading)
doesn't have support for this type.  The jdbc spec does have t BIT type
but that is really the same as the postgres boolean datatype.

I would suggest that you use the bytea type instead.

--Barry


Petr Andrs wrote:
> Hi all,
>
> I need to use BIT(n) type for storing large bitmaps into database and
> access them from Java. But when I am retrieving data into Java via JDBC
> only null (ie no data) is returned and I receive error mesage saying
> something like that I have no conversion or mapping for BIT type
> although Java's java.util.BitSet perfectly matches PostgreSQL's BIT(n)
> type. Is it possible to get data with BIT(n) type into Java. And if yes,
> how?
>
> Thanks.
>
> pa
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Problem with move not returning number of rows affected [was: error when using move, any suggestions?]
Следующее
От: Petr Andrs
Дата:
Сообщение: Re: Accessing BIT(n) type from Java