Re: setObject(i,null) and general "setNull" problems

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: setObject(i,null) and general "setNull" problems
Дата
Msg-id 421A7AA7.9040303@opencloud.com
обсуждение исходный текст
Ответ на setObject(i,null) and general "setNull" problems  (Valentin Rodionov <valiar@scripps.edu>)
Список pgsql-jdbc
Valentin Rodionov wrote:

[...]

Most of this is irrelevant because the driver has already changed back
to the old behaviour, as Kris has pointed out, but..

> Is there any possibility to make this "NULL typing" thing optional? I
> would bet most users of the JDBC driver
> don't care for typing their null values!
> Even if this behavior is a part of the JDBC standard (is it?)

The JDBC standard is set up so that drivers have type information for
all parameters available, even if NULL. For example, see the javadoc for
setNull. The users may not care, but there are cases where the driver or
db can't sensibly/safely infer that type information when it needs to..

It's not clear if setObject(i,null) should be used by a spec-compliant
application or not. It seems like an oversight that this isn't
forbidden, as there's no other way to get an untyped NULL into the
driver. I have asked the JDBC expert group to clarify this but haven't
had a response yet.

There are good robustness reasons for typing all your parameters, even
if NULL, but it seems that noone cares about that :(

-O

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: setObject(i,null) and general "setNull" problems
Следующее
От: Valentin Rodionov
Дата:
Сообщение: Re: setObject(i,null) and general "setNull" problems