Re: stringtype=unspecified problem

From: Kris Jurka <books(at)ejurka(dot)com>
To: Chris Gamache <cgamache(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: stringtype=unspecified problem
Date: 2007-02-14 19:46:46
Message-ID: Pine.BSO.4.64.0702141439480.24142@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Blakely, Jerel (Mission Systems) 2007-02-14 20:44:44 Re: Problem with jdbc connection behavior
Previous Message Jeffrey Cox 2007-02-14 19:40:01 Re: getProcedureColumns