Re: Why is bool == java.sql.Types.BIT ??

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Why is bool == java.sql.Types.BIT ??
Дата
Msg-id BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why is bool == java.sql.Types.BIT ??  (aditsu <aditsu@yahoo.com>)
Ответы Re: Why is bool == java.sql.Types.BIT ??  (aditsu <aditsu@yahoo.com>)
Список pgsql-jdbc
On 24 May 2011 21:20, aditsu <aditsu@yahoo.com> wrote:
>
> Kris Jurka wrote:
>>
>> On Wed, 23 Nov 2005, Thomas Kellerer wrote:
>>
>>> I noticed that table columns that are defined as "bool" (Postgres
>>> datatype)
>>> are reported as java.sql.Types.BIT through DatabaseMetadata (or
>>> ResultSetMetaData).
>>>
>>> Is there any valid reason why they are not reported as
>>> java.sql.Types.BOOLEAN?
>>>
>>
>> Because BOOLEAN is only available to JDBC3.  Our driver still supports
>> JDBC2 so we use BIT.  BOOLEAN and BIT are the same thing as far as we can
>> tell.
>>
>
> Hi, apologies in case this gets posted twice.
> I know this is an old thread, but I just hit this problem now and have the
> same question. I'm currently using postgresql-9.0-801.jdbc4.jar and can't
> see any reason not to use BOOLEAN.
> boolean and bit are not interchangeable or even compatible (except
> semantically); it definitely looks like a bug to me.

Can you explain what (in your application) you would do differently
for a column that returned Types.BOOLEAN versus a column that returned
Types.BIT?

Oliver

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

Предыдущее
От: aditsu
Дата:
Сообщение: Re: Why is bool == java.sql.Types.BIT ??
Следующее
От: aditsu
Дата:
Сообщение: Re: Why is bool == java.sql.Types.BIT ??