BUG #3260: Subtracting intervals - Mailing list pgsql-bugs

From Dhugael McLean
Subject BUG #3260: Subtracting intervals
Date
Msg-id 200705031621.l43GLp7S051027@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #3260: Subtracting intervals  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #3260: Subtracting intervals  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3260
Logged by:          Dhugael McLean
Email address:      box@yourtechonline.com
PostgreSQL version: 8.1.8
Operating system:   FreeBSD
Description:        Subtracting intervals
Details:

select '1 day'::interval - '55 minutes'::interval;

    ?column?
-----------------
 1 day -00:55:00

If the interval periods are both minutes (hours - hours, days - days, etc),
this works fine. Days - minutes seems to fail. This should output 23:05:00.

In case this was some weird casting error, I checked:
select interval '1 day' - interval '55 minutes';
and that failed as well.

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PGSQL - WARNING: 25P01: there is no transaction in progress
Next
From: Tom Lane
Date:
Subject: Re: BUG #3260: Subtracting intervals