Re: BUG #1179: Time comparison fail

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: BUG #1179: Time comparison fail
Дата
Msg-id 20040622145847.R27122@megazone.bigpanda.com
обсуждение исходный текст
Ответ на BUG #1179: Time comparison fail  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Список pgsql-bugs
On Tue, 22 Jun 2004, Mauricio CASTRO wrote:

> You are right!
>
> I am doing something wrong? I understand that there is a difference but I
> don't know why.

Floating point math is inexact.  The date_part(...) is returning a value
that is very close to, but not exactly 4.031 due to accuracy limitations.
So, when you multiply it by 1000 you can get a value very close to, but
not exactly 4031. When it tries to compare it to the bigint 4031, it
converts the bigint to a double as well and gets a different double from
the first.

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: BUG #1179: Time comparison fail
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: BUG #1177: JDBC driver doesn't handle all dates correctly