On Sun, Oct 29, 2023 at 10:09 PM Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
> On Fri, 27 Oct 2023 at 09:38, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> >
> > On Tue, 10 Oct 2023 at 12:36, Ashutosh Bapat
> >
> > > I think we should squash 0002 to 0007.
> >
> > Yes, let's do that with the next update. In fact, we may as well
> > squash 0002 to 0008.
> >
>
> I have pushed 0001. Here is 0002-0008, squashed down to one commit,
> plus the change discussed to use INTERVAL_NOBEGIN() in the btree_gin
> code.
Thanks. I had to leave this halfway on Friday because of severe tooth ache.
I was actually working on the test part of 0009. Though the code
changes are not required, I think it's better to have a test case
along the same lines as the tests added by Tomas (now committed in
8da86d62a11269e926765c0d6ef6f532b2b8b749). I have attached 0002 for
the same along with your v28.
>
> It could use another read-through, and then I think it will be ready for commit.
>
Thanks. I went through the whole patch again and am quite fine with it.
Here's my version of commit message
```
Support Infinite interval values
Interval datatype uses the same input and output representation for
infinite intervals as other datatypes representing time that support
infinity. An interval larger than any other interval is represented by
string literal 'infinity' or '+infinity'. An interval which is smaller
than any other interval is represented as '-infinity'. Internally
positive infinity is represented as maximum values supported by all
the member types of Interval datastructure and negative infinity is
represented as minimum values set to all the members. INTERVAL_NOBEGIN
and INTERVAL_NOEND macros can be used to set an Interval structure to
negative and positive infinity respectively. INTERVAL_IS_NOBEGIN and
INTERVAL_IS_NOEND macros are used to test respective values.
INTERVAL_NOT_FINITE macro is used to test whether a given Interval
value is infinite.
Implementation of all known operators now handles infinite interval
values along with operations related to BRIN index, windowing and
selectivity. Regression tests are added to test these implementation.
If a user has stored interval values '-2147483648 months -2147483648
days -9223372036854775807 us' and '2147483647 months 2147483647 days
9223372036854775806 us' in PostgreSQL versions 16 or earlier. Those
values will turn into '-infinity' and 'infinity' respectively after
upgrading to v17. These values are outside the documented range
supported by interval datatype and thus there's almost no possibility
of this occurrence. But it will be good to watch for these values
during upgrade.
```
--
Best Wishes,
Ashutosh Bapat