Opened 3 years ago
Closed 3 years ago
#33665 closed New feature (duplicate)
Add support for Postgres multirange
Reported by: | Tom Carrick | Owned by: | |
---|---|---|---|
Component: | contrib.postgres | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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.
Change History (4)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 3 years ago
comment:4 by , 3 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Triage Stage: | Accepted → Unreviewed |
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.
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.