Re: setObject on PGInterval throws "Unknown Type null" - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: setObject on PGInterval throws "Unknown Type null"
Date
Msg-id 41F7F3D0.90809@opencloud.com
Whole thread Raw
In response to Re: setObject on PGInterval throws "Unknown Type null"  ("Jean-Pierre Pelletier" <pelletier_32@sympatico.ca>)
List 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

pgsql-jdbc by date:

Previous
From: "Jean-Pierre Pelletier"
Date:
Subject: Re: setObject on PGInterval throws "Unknown Type null"
Next
From: "Jean-Pierre Pelletier"
Date:
Subject: Re: setObject on PGInterval throws "Unknown Type null"