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

Re: setObject on PGInterval throws "Unknown Type null"

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Jean-Pierre Pelletier <pelletier_32(at)sympatico(dot)ca>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setObject on PGInterval throws "Unknown Type null"
Date: 2005-01-26 21:19:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Jean-Pierre Pelletier wrote:

> The advantage of overloaded versions of setObject over new method names 
> was to
> provide backward compatibility for setObject(i,x)
> i.e. no need to recode setObject(i,x) to setObject(i,x,Types.someType)
> because setObject(i,x) is now broken with null objects.

How is this backwards-compatible? Without recompilation, adding extra 
methods doesn't do anything. With recompilation, you need to add a cast 
to PGStatement to see the new methods. If you're changing the code 
anyway, why not just change to the typed setObject() variant?


In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-01-27 11:30:29
Subject: Re: Documentation for jdbc escapes
Previous:From: Jean-Pierre PelletierDate: 2005-01-26 21:03:08
Subject: Re: setObject on PGInterval throws "Unknown Type null"

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