RE: null to zero? - Mailing list pgsql-jdbc

From Peter Mount
Subject RE: null to zero?
Date
Msg-id 5.0.2.1.0.20010410164836.00a34210@mail.retep.org.uk
Whole thread Raw
In response to RE: null to zero?  ("chris markiewicz" <cmarkiew@commnav.com>)
List pgsql-jdbc
At 10:59 06/04/01 -0400, chris markiewicz wrote:
>hello.
>
>it seems that a null value in an integer (int4) column gets converted to
>zero at some point...is this accurate?  i look in the db and see null
>(queried using IS NULL to make sure), but i call an rs.getObject(colName)
>and get a java.lang.Integer with a value of zero...is this in jdbc or java?
>an Integer can BE null, but it cannot have a value of null...

I'll check the specs. IIRC getObject on a null'ed field should return null,
but I have a feeling this question came up recently (well a few months ago).

>didn't see anything in the archives...

Whew, someone who has looked at them ;-)

Peter


>thanks
>chris
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://www.postgresql.org/search.mpl


pgsql-jdbc by date:

Previous
From: "Raghunath T"
Date:
Subject: RE: How connect JDBC
Next
From: Peter Mount
Date:
Subject: Re: Error codes in JDBC drivers