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

RE: null to zero?

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: <cmarkiew(at)commnav(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Cc: <chris(dot)markiewicz(at)commnav(dot)com>
Subject: RE: null to zero?
Date: 2001-04-10 15:49:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
At 10:59 06/04/01 -0400, chris markiewicz wrote:
>it seems that a null value in an integer (int4) column gets converted to
>zero at some 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 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 ;-)


>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?

In response to

pgsql-jdbc by date

Next:From: Peter MountDate: 2001-04-10 15:55:23
Subject: Re: JDBC and Perl compiling problems w/ postgresql-7.1rc4
Previous:From: Peter MountDate: 2001-04-10 15:48:20
Subject: Re: Error codes in JDBC drivers

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