BUG #8230: Time interval size overflow - Mailing list pgsql-bugs

From rok.kralj@gmail.com
Subject BUG #8230: Time interval size overflow
Date
Msg-id E1UoAkT-0006qe-E5@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #8230: Time interval size overflow
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8230
Logged by:          Rok Kralj
Email address:      rok.kralj@gmail.com
PostgreSQL version: 9.2.4
Operating system:   Arch Linux
Description:        =


As far as I know, the INTERVAL type is represented using three int32, one
for months, days and milliseconds.

However, overflow detections seems to work correctly only on these three
types; if they get overflown indirectly, they do not get detected:

SELECT INTERVAL '3000000000 days'
ERROR:  interval field value out of range: "3000000000 days"

SELECT INTERVAL '2000000000 years'
-147483648 years

I'm surprised this hasn't been reported yet. The expected behaviour is to
raise an error.

pgsql-bugs by date:

Previous
From: Jeff Frost
Date:
Subject: Re: BUG #8225: logging options don't change after reload
Next
From: Вилен Тамбовцев
Date:
Subject: Re: BUG #7971: Xml special symbols are not unescaped when gettting value of Xml via xpath