Re: tightening up on use of oid 0

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: tightening up on use of oid 0
Дата
Msg-id 416DE703.8080202@opencloud.com
обсуждение исходный текст
Ответ на Re: tightening up on use of oid 0  ("Iain" <iain@mst.co.jp>)
Список pgsql-jdbc
Iain wrote:
> Hi Oliver,
>
> Just out of interest, is the case you marked,
>
>>   setObject(i, (Integer)null);     // (*)
>
> equivalent to
>
>    Integer someInteger = null;
>    setObject(i, someInteger);
>
> ?

Yes.

> I would ask the question then, is there any situation where there is no
> alternative to the insufficiantly typed calls you listed?

I think there is always an alternative.

For standard types you can use setNull or setObject with a type code:

   setNull(i, Types.INTEGER);
   setObject(i, null, Types.INTEGER);

For extension types (classed as Types.OTHER) you can use the singleton
NULL objects I introduced in my patch:

   setObject(i, PGline.NULL);
   setObject(i, PGline.NULL, Types.OTHER);

-O

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

Предыдущее
От: "Iain"
Дата:
Сообщение: Re: tightening up on use of oid 0
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Corrections and Translation update: pt_BR