Possible bug in PGInterval class

Поиск
Список
Период
Сортировка
От Ľubomír Varga
Тема Possible bug in PGInterval class
Дата
Msg-id 200908312134.12661.luvar@plaintext.sk
обсуждение исходный текст
Ответы Re: Possible bug in PGInterval class
Список pgsql-jdbc
Hi.

I have noticed imho bad behaviour of add methods for PGInterval class.
(org.postgresql.util.PGInterval)

First is unlogical adding sum to parameter and not to object on which is
method invoked. (this is also writen in javadoc, so I accept it)

Second, critical for me, is to not using modulo in addition. So if you add 55
minutes to 55 minutes, you get 110 minutes instead of 1 hour and 50 minutes.

Is this bug or feature? Should I use to postprocessing of sql query result
some other date classes? (joda time, or java date class...)

Thanks for answer.

PS: If it is not bug, please add some description to javadoc also to this
behaviour.

I am using 8.4-701 build and source...

--
Odborník na všetko je zlý odborník. Ja sa snažím byť výnimkou potvrdzujúcou
pravidlo.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Search content within a bytea field
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Possible bug in PGInterval class