Skip site navigation (1) Skip section navigation (2)

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: (view raw or whole 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


pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group