BUG #1179: Time comparison fail

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1179: Time comparison fail
Date: 2004-06-22 21:12:41
Message-ID: 20040622211241.E6F0DCF495F@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1179
Logged by: Mauricio CASTRO ESPINOSA

Email address: mcastroe(at)hotmail(dot)com

PostgreSQL version: 7.2.4

Operating system: RedHat 7.3 uname:Linux Play 2.4.18-3 #1 Thu Apr 18
07:37:53 EDT 2002 i686 unknown

Description: Time comparison fail

Details:

must_betrue is false for the query bellow

psql:
----------------------------
age(endeddatetime,starteddatetime),time,date_part('second',(age(endeddateti
me,starteddatetime)))*1000,date_part('second',(age(endeddatetime,starteddat
mex2=# select etime)))*1000=time as
Must_beTrue,starteddatetime,endeddatetime from entry where not
date_part('second',(age(endeddatetime,starteddatetime)))*1000=time;
age | time | ?column? | must_betrue | starteddatetime |
endeddatetime
--------------+------+----------+-------------+----------------------------
+----------------------------
00:00:04.031 | 4031 | 4031 | f | 2004-05-10 12:47:51.171-05 |
2004-05-10 12:47:55.202-05
00:00:04.094 | 4094 | 4094 | f | 2004-05-10 12:47:51.171-05 |
2004-05-10 12:47:55.265-05
00:00:04.047 | 4047 | 4047 | f | 2004-05-10 12:50:32.781-05 |
2004-05-10 12:50:36.828-05
00:00:02.047 | 2047 | 2047 | f | 2004-05-10 14:10:54.171-05 |
2004-05-10 14:10:56.218-05
00:00:04.046 | 4046 | 4046 | f | 2004-05-10 14:13:05.312-05 |
2004-05-10 14:13:09.358-05
(5 rows)

mex2=# select count(*) from entry;
count
-------
689
(1 row)

mex2=# \d entry
Table "entry"
Column | Type | Modifiers
-------------------+--------------------------+----------------------------
----------------
id | integer | not null default
nextval('entry_id'::text)
ord | integer |
func | character varying(200) |
source | character varying(200) |
started | bigint |
starteddatetime | timestamp with time zone |
time | bigint |
size | bigint |
operation | character varying(200) |
result | character varying(200) |
type | character varying(200) |
url | character varying(1500) |
authority | character varying(200) |
path | character varying(750) |
query | character varying(750) |
incache | boolean |
lastmodificaction | timestamp with time zone |
expires | timestamp with time zone |
lastcacheupdate | timestamp with time zone |
lastaccess | timestamp with time zone |
endeddatetime | timestamp with time zone |
Primary key: entry_pkey

mex2=# SELECT version();
version
-------------------------------------------------------------
PostgreSQL 7.2.4 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

mex2=# \!uname -a
Linux Play 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2004-06-22 21:27:25 Re: BUG #1179: Time comparison fail
Previous Message Tom Lane 2004-06-22 17:23:38 Re: BUG #1178: PQexecPrepared - PostgreSQL 7.4.1