Re: Interval support for Postgres

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Siegmar <o(dot)siegmar(at)vitrado(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Interval support for Postgres
Date: 2005-04-29 08:01:05
Message-ID: Pine.BSO.4.56.0504290238150.3380@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
pgjdbc_interval4.diff text/plain 19.7 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-04-29 08:04:34 Re: Impact of open ResultSets and PreparedStatements ?
Previous Message Oliver Jowett 2005-04-29 05:46:22 Re: Is a way avoiding the driver crash with unicode data?