Re: Interval support for Postgres - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Interval support for Postgres
Date
Msg-id Pine.BSO.4.56.0504290238150.3380@leary.csoft.net
Whole thread Raw
In response to Re: Interval support for Postgres  (Oliver Siegmar <o.siegmar@vitrado.de>)
Responses Re: Interval support for Postgres
List pgsql-jdbc

On Sat, 23 Apr 2005, Oliver Siegmar wrote:

> The applied patch contains all modifications from the last one
> (pgjdbc_interval2.diff) as well as a replacement for the regular expression
> code.
>

Here's my version of it.  Changes:
 - Always use noniso format for sending intervals to the backend.
   This makes it possible to support a seconds field of 90.  Also
   don't need to worry about signs of fields.
 - Calendar.getTimeInMillis is protected before 1.4
 - Added db access to the test case

My one remaining question is about the roll function.  What is the purpose
of roll, don't we want add?  Ignoring carryover seems like a mistake.
Also in the roll method the milliseconds calculation should round the
value so 0.6006 seconds becomes 601 milliseconds.

Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Is a way avoiding the driver crash with unicode data?
Next
From: Kris Jurka
Date:
Subject: Re: Impact of open ResultSets and PreparedStatements ?