Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 52E7C9FBB81 for ; Wed, 14 Feb 2007 15:46:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 74179-08 for ; Wed, 14 Feb 2007 15:46:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 712E49FB90C for ; Wed, 14 Feb 2007 15:46:47 -0400 (AST) Received: (qmail 25098 invoked by uid 1112); 14 Feb 2007 19:46:46 -0000 Date: Wed, 14 Feb 2007 14:46:46 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Chris Gamache cc: pgsql-jdbc@postgresql.org Subject: Re: stringtype=unspecified problem In-Reply-To: <9cc55f600702141129l152d6e68i8c32fa0bb11bc788@mail.gmail.com> Message-ID: References: <9cc55f600702091415r22648579uf5bc0d00e4c9932b@mail.gmail.com> <45CED295.8050808@opencloud.com> <9cc55f600702141129l152d6e68i8c32fa0bb11bc788@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/67 X-Sequence-Number: 16623 On Wed, 14 Feb 2007, Chris Gamache wrote: > Here's a test case... Since I'm handling these UUIDs as Strings > throughout the java code, they are indistinguishable from an actual > string. > > //bombOnNull.setNull(1, java.sql.Types.OTHER); //this works > bombOnNull.setNull(1, java.sql.Types.VARCHAR); //this bombs Here you're explicitly saying that it is a VARCHAR, not that you have a String that you're not sure what the real type is. It would be possible to adjust setNull to check the stringtype setting and use Oid.UNSPECIFIED here, but I'm not sure that would be correct. Kris Jurka