Opened 3 years ago
Closed 3 years ago
#33238 closed New feature (wontfix)
Implement PostgreSQL Multi Range data types
Reported by: | Andrew Chen Wang | Owned by: | |
---|---|---|---|
Component: | contrib.postgres | Version: | 3.2 |
Severity: | Normal | Keywords: | postgresql, multirange, multi |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
PostgreSQL v14 was released on Sep 30th and includes multi range data types. An example can be seen here: https://blog.crunchydata.com/blog/better-range-types-in-postgres-14-turning-100-lines-of-sql-into-3. A multi range data type simply prepends "multi" to "range" in the name of the data type. For instance, tstzrange becomes tstzmultirange which looks like an array with tstzranges. The benefit of having this is to avoid large SQL statements and "precomputing availability on large systems".
Thanks for this proposition, however it looks niche and can be hard to maintain (tricky update, custom operators, probably new database functions, etc.). Personally, I would add a related table with a
range
field instead of amultirange
field. It sounds like a third-party package is the best way to proceed.You can start a discussion on DevelopersMailingList if you don't agree, following triaging guidelines with regards to wontfix tickets.