X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A798632BDD4 for ; Thu, 14 Oct 2004 03:40:22 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15278-05 for ; Thu, 14 Oct 2004 02:40:09 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 9569432BD89 for ; Thu, 14 Oct 2004 03:40:13 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1CHvXG-0007rn-00; Thu, 14 Oct 2004 15:40:10 +1300 Message-ID: <416DE703.8080202@opencloud.com> Date: Thu, 14 Oct 2004 15:40:03 +1300 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Cc: pgsql-jdbc@postgresql.org Subject: Re: tightening up on use of oid 0 References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <416C3E22.9080605@opencloud.com> <416CF557.2040000@opencloud.com> <001901c4b112$e9c38890$7201a8c0@mst1x5r347kymb> <416DB1CA.5090005@opencloud.com> <007101c4b195$b911a000$7201a8c0@mst1x5r347kymb> In-Reply-To: <007101c4b195$b911a000$7201a8c0@mst1x5r347kymb> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/136 X-Sequence-Number: 11241 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