e.g.:
{{{
select nummultirange(numrange(null, 2), numrange(4, 5), numrange(8, 9));
}}}
Gives `"{(,2),[4,5),[8,9)}"`.
I would like to have some support for these in Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/33665>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> Postgres 14 adds various multirange data types corresponding to the
> existing range types: https://www.postgresql.org/docs/14/rangetypes.html
>
> e.g.:
>
> {{{
> select nummultirange(numrange(null, 2), numrange(4, 5), numrange(8, 9));
> }}}
>
> Gives `"{(,2),[4,5),[8,9)}"`.
>
> I would like to have some support for these in Django.
New description:
Postgres 14 adds various multirange data types corresponding to the
existing range types: https://www.postgresql.org/docs/14/rangetypes.html
e.g.:
{{{
select nummultirange(numrange(null, 2), numrange(4, 5), numrange(8, 9));
}}}
Gives `"{(,2),[4,5),[8,9)}"`.
I would like to have some support for these in Django.
One use case: an app that finds time for meetings. Each user submits
ranges of times they're available on a calendar and the app suggests times
that works for everyone / the most people.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33665#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/33665#comment:2>
Comment (by Tom Carrick):
I just found https://code.djangoproject.com/ticket/33238 for this issue
but closed as wontfix. I didn't find it the first time because I searched
for "multirange" rather than "multi range".
Anyway I do think this can be implemented without too much of a
maintenance burden. I have some ideas on the implementation but I haven't
thought about it too closely.
I just wanted to add this because I didn't see the original ticket so I'm
not sure if this one should be closed as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/33665#comment:3>
* status: new => closed
* resolution: => duplicate
* stage: Accepted => Unreviewed
Comment:
Thanks! I had a gut feeling that I'd seen it already 🤦. Let's close it as
a duplicate of #33238. Please leave a comment in the original ticket. We
can reopen it if you provides PoC that is maintainable.
--
Ticket URL: <https://code.djangoproject.com/ticket/33665#comment:4>