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 4B155329F2C for ; Fri, 8 Oct 2004 21:24:06 +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 50418-05 for ; Fri, 8 Oct 2004 20:23:30 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id BE9C0329EF8 for ; Fri, 8 Oct 2004 21:23:30 +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 1CG1Gu-00012w-00; Sat, 09 Oct 2004 09:23:24 +1300 Message-ID: <4166F72E.9010201@opencloud.com> Date: Sat, 09 Oct 2004 09:23:10 +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: Kris Jurka Cc: "pgsql-jdbc@postgresql.org" Subject: Re: tightening up on use of oid 0 References: <41660A56.5000107@opencloud.com> In-Reply-To: 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=1.1 tagged_above=0.0 required=5.0 tests=NO_DNS_FOR_FROM X-Spam-Level: * X-Archive-Number: 200410/64 X-Sequence-Number: 11169 Kris Jurka wrote: > > On Fri, 8 Oct 2004, Oliver Jowett wrote: > >>Executing "SELECT foo(?)" via PreparedStatement will work fine if you >>pass a non-null PGline or PGbox argument to setObject, but if you try to >>setNull() then you will get ambiguity between the two functions at >>execution time. >> >>I can't see a way to fix this without a postgresql extension of some >>sort. Options I can think of are: > > > Can't the existing PGobject interface handle this. You can create a > PGobject with the correct datatype and a null value and that should work. OK, so getValue() and toString() return null? This would still mean that setNull() would not work for Types.OTHER, though. -O