Re: Problems with infinity - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Problems with infinity
Date
Msg-id Pine.BSO.4.56.0501140719390.16048@leary.csoft.net
Whole thread Raw
In response to Re: Problems with infinity  (Oliver Siegmar <o.siegmar@vitrado.de>)
Responses Re: Problems with infinity  (Oliver Siegmar <o.siegmar@vitrado.de>)
Re: Problems with infinity  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc

On Fri, 14 Jan 2005, Oliver Siegmar wrote:

> Well...it has high priority for me, so drop it from your todo and apply my
> patch ;-))

The beauty of open source at work.

> I tested it and it works well here. I tried to use your coding style, hope
> everything is well. Maybe performance could be tweaked a bit by externalising
> "infinity" and "-infinity" strings to a final static, but I think java
> handles this properly with its internal string pool.

This looks alright for timestamp, but I don't think this is the right
thing to do for date and time.  The result of getDate should have no hour,
minute, and seconds component.  Likewise for getTime the date components
should be set to the unix zero epoch.  This means that setDate and setTime
can't really take infinite values (at least how you're proposing), but
that's not a real issue because pg's date and time types don't support
infinity.  Do you think it is important to support these or is timestamp
alone enough?

> I also removed the now obsolete exception message from the .po files - so the
> line numbers have to be renumbered (don't know how to do).

Don't worry about these.  This process is handled automatically by
gettext.  The only people who touch these are translators.

> Of course it has to be well tested. I don't know how it will perform on other
> PostgreSQL versions other than 7.4. I hope I haven't created any bad side
> effects.

The way to make sure this works (both now and in the future) is to add a
test or two to the test suite.  See org/postgresql/test/ and
http://jdbc.postgresql.org/development/intro.html#Test+Suite

Kris Jurka

pgsql-jdbc by date:

Previous
From: Oliver Siegmar
Date:
Subject: Re: Problems with infinity
Next
From: Oliver Siegmar
Date:
Subject: Re: Problems with infinity