From: Oliver Jowett <oliver@opencloud.com>
To: Iain <iain@mst.co.jp>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: tightening up on use of oid 0
Date: Thu, 14 Oct 2004 11:52:58 +1300
Message-ID: <416DB1CA.5090005@opencloud.com> (raw)
In-Reply-To: <001901c4b112$e9c38890$7201a8c0@mst1x5r347kymb>
References: <41660A56.5000107@opencloud.com>
<4167BC1A.4070809@opencloud.com>
<Pine.BSO.4.56.0410120027040.9158@leary.csoft.net>
<416C3E22.9080605@opencloud.com>
<Pine.BSO.4.56.0410121550580.7695@leary.csoft.net>
<416CF557.2040000@opencloud.com>
<001901c4b112$e9c38890$7201a8c0@mst1x5r347kymb>
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<Anything> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, iain@mst.co.jp, books@ejurka.com
Subject: Re: tightening up on use of oid 0
In-Reply-To: <416DB1CA.5090005@opencloud.com>
References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <Pine.BSO.4.56.0410120027040.9158@leary.csoft.net> <416C3E22.9080605@opencloud.com> <Pine.BSO.4.56.0410121550580.7695@leary.csoft.net> <416CF557.2040000@opencloud.com> <001901c4b112$e9c38890$7201a8c0@mst1x5r347kymb> <416DB1CA.5090005@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox