From: | "Bjrn Sjlenius" <salvium(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2093: SUM of timeintervals, no problems in 8.0.3 |
Date: | 2005-12-04 10:33:42 |
Message-ID: | 20051204103342.0AE50F0BC1@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2093
Logged by: Bjrn Sjlenius
Email address: salvium(at)gmail(dot)com
PostgreSQL version: 8.1
Operating system: OpenBSD 3.8
Description: SUM of timeintervals, no problems in 8.0.3
Details:
Just upgraded fron 8.0.5 to 8.1, and a function where I summerize logon time
now give quite odd result. Duplicated the problem;
----------------- Commands to execute ------------------
createdb test
psql test
CREATE TABLE activity_tab (
nick character varying(32),
logon timestamp with time zone,
logoff timestamp with time zone
);
COPY activity_tab (nick, logon, logoff) FROM stdin USING DELIMITERS '|';
apa|2005-11-01 00:00:00+01|2005-11-01 23:00:00+01
apa|2005-11-02 00:00:00+01|2005-11-02 23:00:00+01
apa|2005-11-03 00:00:00+01|2005-11-04 23:00:00+01
\.
SELECT LOWER(nick) AS "nick", SUM(logoff-logon) AS "time"
FROM activity_tab
GROUP BY LOWER(nick);
\q
dropdb test
----------------- End of commands ------------------
The result I get;
nick | time
------+----------------
apa | 1 day 69:00:00
Expected result is what 8.0.3 give me;
nick | time
------+----------------
apa | 3 days 21:00:00
Hope you can help! And a BIG THANKYOU for your great work!
Best regards, Bjrn
From | Date | Subject | |
---|---|---|---|
Next Message | Joost Kraaijeveld | 2005-12-04 22:29:30 | Is this a bug???? |
Previous Message | Bruce Momjian | 2005-12-04 04:23:28 | Re: attislocal value changed with the dump |