Re: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT
| От | Oliver Jowett |
|---|---|
| Тема | Re: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT |
| Дата | |
| Msg-id | 43A7ACCC.3020601@opencloud.com обсуждение исходный текст |
| Ответ на | Re: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT correctly ("j.random.programmer" <javadesigner@yahoo.com>) |
| Ответы |
Re: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT correctly
|
| Список | pgsql-jdbc |
j.random.programmer wrote: > Anywho, in the JDBC driver, why not convert > java booleans as follows: > > true -> '1' > false -> '0' > > and store that in the BIT column ? That wouldn't help you as the parameter is typed as boolean at the protocol level, as is reflected in your error message -- it is a type issue, not a representation issue. If you really want to do a conversion, make it explicit in your query. > Of course, if someone has the following > in the BIT column > > '1001010' > > then: > a) allow the entire value to be retrieved as a String > (getString...) We do that already. > b) If there are any 1's present, return true > is retrieving it as boolean, false if all 0's. That seems very error-prone. -O
В списке pgsql-jdbc по дате отправления: