Re: Equality search on timestamp value returns no rows

Поиск
Список
Период
Сортировка
От Tomasz Ostrowski
Тема Re: Equality search on timestamp value returns no rows
Дата
Msg-id 48886BD3.1010206@batory.org.pl
обсуждение исходный текст
Ответ на Equality search on timestamp value returns no rows  (Keaton Adams <kadams@mxlogic.com>)
Список pgsql-general
On 2008-07-23 21:24, Keaton Adams wrote:

> We run into a problem when an equality search on a timestamp column
> returns no records, even when there are records to return, as in this
> example:
>
> mxl=# select * from mxl_scheduler_queue where status_modified =
> '2008-07-03 16:55:06.44695-06';

Never use equality with floating point number as they are stored inexact.

Use for example:
select * from mxl_scheduler_queue where status_modified>='2008-07-03
16:55:06' and status_modified<'2008-07-03 16:55:07';

You can also compile Postgres with integer timestamps which does not
have this problem. You'll need to backup/initdb/restore though.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

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

Предыдущее
От: "M. François Benoît-Marand"
Дата:
Сообщение: Re: C function working with input/ouput tables failed !
Следующее
От: John DeSoi
Дата:
Сообщение: Re: mac install question