Re: Problems with infinity

From: Oliver Siegmar <o(dot)siegmar(at)vitrado(dot)de>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problems with infinity
Date: 2005-01-14 12:05:30
Message-ID: 200501141305.31056.o.siegmar@vitrado.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Friday 14 January 2005 09:05, Kris Jurka wrote:
> On Fri, 14 Jan 2005, Oliver Siegmar wrote:
> > Well, I'd set Long.MIN_VALUE / Long.MAX_VALUE to the Timestamp - the
> > pgsql driver could simply convert this to '-infinity' / 'infinity'
> > strings, not? This could be done for both directions.
>
> Ahh, of course! The pg timestamp range is completely irrelevent to this
> discussion because we are using infinity. That does sound workable. I'll
> put it on the todo, but I personally don't think it's very high priority.

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

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.
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).

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.

Cheers,
Oliver

Attachment Content-Type Size
pgjdbc_infinity.patch.gz application/x-gzip 1.1 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-01-14 12:29:54 Re: Problems with infinity
Previous Message Kris Jurka 2005-01-14 08:05:26 Re: Problems with infinity