Search Postgresql Archives

Re: Equality search on timestamp value returns no rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux