Thread: Interval type

Interval type

From
Ricardo Vaz Mannrich
Date:
How can I get an interval value with JDBC?

--
Ricardo Vaz Mannrich <rvm_l1@silcom.com.br>


Re: Interval type

From
Kris Jurka
Date:

On Mon, 13 Dec 2004, Ricardo Vaz Mannrich wrote:

> How can I get an interval value with JDBC?
>

There is no corresponding Java type for an interval, so the best you can
do is ResultSet.getString().  The driver has a stub class
org.postgresql.util.PGInterval that will be returned by getObject().  It
would be nice if someone added a real implementation that could parse an
interval string and methods that returned the individual fields.

Kris Jurka