Re: Problems with infinity - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Problems with infinity
Date
Msg-id 23736.1105717138@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problems with infinity  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris Jurka <books@ejurka.com> writes:
> 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?

There is a TODO item to allow +infinity and -infinity in the DATE datatype.
So I'd recommend making sure you handle that case, even if it can't
occur today.

Don't recall anyone having ever asked for infinity in the TIME type.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Problems with infinity
Next
From: "j.random.programmer"
Date:
Subject: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently