Re: Problems with infinity

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: Problems with infinity
Date: 2005-01-14 12:29:54
Message-ID: Pine.BSO.4.56.0501140719390.16048@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Siegmar 2005-01-14 12:52:02 Re: Problems with infinity
Previous Message Oliver Siegmar 2005-01-14 12:05:30 Re: Problems with infinity