pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Siegmar <o.siegmar@vitrado.de>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problems with infinity
Date: Fri, 14 Jan 2005 13:05:30 +0100
Message-ID: <200501141305.31056.o.siegmar@vitrado.de> (raw)
In-Reply-To: <Pine.BSO.4.56.0501140257030.24417@leary.csoft.net>
References: <200501131419.00993.o.siegmar@vitrado.de>
	<200501140824.41665.o.siegmar@vitrado.de>
	<Pine.BSO.4.56.0501140257030.24417@leary.csoft.net>

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

Attachments:

  pgjdbc_infinity.patch.gz (application/x-gzip, 1.1K) download

view thread (27+ messages)  latest in thread

Message-ID: <200501141305.31056.o.siegmar@vitrado.de>
Permalink:  ../200501141305.31056.o.siegmar@vitrado.de/
Also on:    postgresql.org/message-id/200501141305.31056.o.siegmar@vitrado.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: o.siegmar@vitrado.de, books@ejurka.com
  Subject: Re: Problems with infinity
  In-Reply-To: <200501141305.31056.o.siegmar@vitrado.de>
  References: <200501131419.00993.o.siegmar@vitrado.de> <200501140824.41665.o.siegmar@vitrado.de> <Pine.BSO.4.56.0501140257030.24417@leary.csoft.net> <200501141305.31056.o.siegmar@vitrado.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox