From: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Infinite Interval |
Date: | 2023-01-14 21:22:49 |
Message-ID: | CAAvxfHcm1TPwH_zaGWuFoL8pZBestbRZTU6Z=-RvAdSXTPbKfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
v11-0001-Support-infinite-interval.patch | text/x-patch | 87.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-01-14 21:23:47 | Re: Removing redundant grouping columns |
Previous Message | Justin Pryzby | 2023-01-14 20:57:07 | Re: Support for dumping extended statistics |