Skip site navigation (1) Skip section navigation (2)

Re: BUG #1179: Time comparison fail

From: "Mauricio CASTRO" <mcastroe(at)hotmail(dot)com>
To: sszabo(at)megazone(dot)bigpanda(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1179: Time comparison fail
Date: 2004-06-22 21:54:35
Message-ID: BAY18-F95z3tAFxZSHG0000d170@hotmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
You are right!

I am doing something wrong? I understand that there is a difference but I 
don't know why.

mex2=# select
mex2-#   age(endeddatetime,starteddatetime),
mex2-#   time,
mex2-#   date_part('second',(age(endeddatetime,starteddatetime)))*1000,
mex2-#   date_part('second',(age(endeddatetime,starteddatetime)))*1000-time 
as Must_be_Zero,
mex2-#   date_part('second',((starteddatetime)))*1000 as starteddatetime_s,
mex2-#   date_part('second',((endeddatetime)))*1000 as endeddatetime_s,
mex2-#   starteddatetime,
mex2-#   endeddatetime
mex2-#   from entry where  not 
date_part('second',(age(endeddatetime,starteddatetime)))*1000=time;
     age      | time | ?column? |     must_be_zero      | starteddatetime_s 
| endeddatetime_s |      starteddatetime       |       endeddatetime
--------------+------+----------+-----------------------+-------------------+-----------------+----------------------------+----------------------------
00:00:04.031 | 4031 |     4031 | -4.54747350886464e-13 |             51171 | 
           55202 | 2004-05-10 12:47:51.171-05 | 2004-05-10 12:47:55.202-05
00:00:04.094 | 4094 |     4094 |  4.54747350886464e-13 |             51171 | 
           55265 | 2004-05-10 12:47:51.171-05 | 2004-05-10 12:47:55.265-05
00:00:04.047 | 4047 |     4047 | -4.54747350886464e-13 |             32781 | 
           36828 | 2004-05-10 12:50:32.781-05 | 2004-05-10 12:50:36.828-05
00:00:02.047 | 2047 |     2047 |  2.27373675443232e-13 |             54171 | 
           56218 | 2004-05-10 14:10:54.171-05 | 2004-05-10 14:10:56.218-05
00:00:04.046 | 4046 |     4046 |  4.54747350886464e-13 |              5312 | 
            9358 | 2004-05-10 14:13:05.312-05 | 2004-05-10 14:13:09.358-05
(5 rows)

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


Responses

pgsql-bugs by date

Next:From: Stephan SzaboDate: 2004-06-22 22:23:10
Subject: Re: BUG #1179: Time comparison fail
Previous:From: Stephan SzaboDate: 2004-06-22 21:27:25
Subject: Re: BUG #1179: Time comparison fail

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group