Re: tightening up on use of oid 0

Поиск
Список
Период
Сортировка
Искать
От
Oliver Jowett
Тема
Re: tightening up on use of oid 0
Дата
Msg-id
416DB1CA.5090005@opencloud.com
Ответ на
Список
Дерево обсуждения
tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Kris Jurka <books@ejurka.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Kris Jurka <books@ejurka.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Tom Lane <tgl@sss.pgh.pa.us>
Re: tightening up on use of oid 0 Kris Jurka <books@ejurka.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Kris Jurka <books@ejurka.com>
Re: tightening up on use of oid 0 Oliver Jowett <oliver@opencloud.com>
Re: tightening up on use of oid 0 Kris Jurka <books@ejurka.com>
Iain wrote:
> Hi,
> 
> For my part, I've never used any of those calls.
> 
> FWIW, I always use reference objects such as "Integer" as opposed to 
> "int" so I've never done it that way. All calls to setObject or 
> set would always use a variable which is typed (and may be 
> null) my assumption is that I avoid all such ambiguities that way.

Just to clarify.. these calls are typed:

   setInt(i, 42);
   setObject(i, new Integer(42));
   setObject(i, new Integer(42), Types.INTEGER);
   setObject(i, null, Types.INTEGER);
   setNull(i, Types.INTEGER);
   setObject(i, new PGline(...), Types.OTHER);

These calls are not (sufficiently) typed:

   setObject(i, null);
   setObject(i, (Integer)null);     // (*)
   setObject(i, null, Types.OTHER);
   setNull(i, Types.OTHER);

Types.OTHER on its own is not specific enough to identify a particular 
backend type, and Java nulls have no inherent type ('instanceof' will 
always return false).

 From your description it sounds like you may use the case marked (*) ?

-O
В списке pgsql-jdbc по дате отправления
От: Tornroth, Phill
Дата:
От: Oliver Jowett
Дата:
FAQ