Re: Infinite Interval - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Re: Infinite Interval
Date
Msg-id CAAvxfHcm1TPwH_zaGWuFoL8pZBestbRZTU6Z=-RvAdSXTPbKfg@mail.gmail.com
Whole thread Raw
In response to Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Responses Re: Infinite Interval
List pgsql-hackers
Ok, I've updated the patch to handle every function that inputs or
outputs intervals, as well as added some tests. In the process I
noticed that some of the existing date/timestamp/timestamptz don't
handle infinite values properly. For example,
postgres=# SELECT age('infinity'::timestamp);
age
--------------------------------------------------
-292253 years -11 mons -26 days -04:00:54.775807
(1 row)

It might be worth going through all those functions separately
and making sure they are correct.

I also added some overflow handling to make_interval.

I also added handling of infinite timestamp subtraction.

At this point the patch is ready for review again except for the one
outstanding question of: Should finite checks on intervals only look at
months or all three fields?

- Joe

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Support for dumping extended statistics
Next
From: Tom Lane
Date:
Subject: Re: Removing redundant grouping columns