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 19:47:28
Message-ID: 41F7F3D0.90809@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Jean-Pierre Pelletier wrote:

> public void setObject(int parameterIndex, PGInterval x)
> throws SQLException

Overloading setObject() sounds very risky. How about this instead:

   public void setInterval(int parameterIndex, PGInterval x)
     throws SQLException

That said, this doesn't help the general case as we can't know the set 
of extension types ahead of time.

> public void setObject(int parameterIndex, Integer x)
> throws SQLException

> public void setObject(int parameterIndex, String x)
> throws SQLException

I don't see the benefit of these methods; they're just a nonstandard way 
of doing things that standard JDBC already lets you do (the second one 
especially -- it's identical to PreparedStatement.setString())

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Jean-Pierre PelletierDate: 2005-01-26 21:03:08
Subject: Re: setObject on PGInterval throws "Unknown Type null"
Previous:From: Jean-Pierre PelletierDate: 2005-01-26 19:22:53
Subject: Re: setObject on PGInterval throws "Unknown Type null"

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