Re: Problems with infinity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems with infinity
Дата
Msg-id 23736.1105717138@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problems with infinity  (Kris Jurka <books@ejurka.com>)
Список 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 по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Problems with infinity
Следующее
От: "j.random.programmer"
Дата:
Сообщение: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently