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

Поиск
Список
Период
Сортировка
От aditsu
Тема Re: Why is bool == java.sql.Types.BIT ??
Дата
Msg-id 1306235143484-4421744.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Why is bool == java.sql.Types.BIT ??  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Why is bool == java.sql.Types.BIT ??  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Oliver Jowett wrote:
>
> 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?
>

It has to do with analyzing/comparing table structures, copying tables on
another server (especially when it uses a different DBMS), and generally
handling column types automatically in various situations.
If it returns BIT for a boolean column, then I have to add some special
handling when using postgres to check for the type name and adjust
accordingly.
In the particular application where I found the problem, I was doing a
"diff" between 2 table structures, and it was generating something like
"ALTER TABLE request ADD COLUMN active bit" where "active" was supposed to
be boolean. While both types seem to use Boolean on the java side, they are
not compatible in postgres.

Adrian

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Why-is-bool-java-sql-Types-BIT-tp2169629p4421744.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

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

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