#27147: Add support for defining bounds in postgres range fields
-------------------------------------+-------------------------------------
Reporter: impala2 | Owner:
Type: New feature | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: postgres range | Triage Stage:
bounds | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by impala2):
Replying to [comment:1 timgraham]:
> Can you give a use case to demonstrate exactly how this would work? See
also #26345.
That ticket only refers to the documentation, not adding ability to
override.
My use-case is for date ranges. It's often more natural to have inclusive
ranges (`[]`) than the default `[)`. For example it would make more sense
that is something active for a month to start on the first and end on the
last day of the month rather than the first of the next month, no?
I recently converted a model from a lower/upper bound pair of date fields
to a DateRange to take advantage of the gist index overlap exclusion but
had to give up this natural property. I was hoping to implement the
ability to do any type of bounds in django to bring the functionality
back. Of course even for dates this is not always most optimal - hotel
reservations make more sense with a `[)` range as people can check-in on
the same day that others check out in the same room.
Anyway that's my 2ยข.
--
Ticket URL: <https://code.djangoproject.com/ticket/27147#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.cdd9a678ed552ffa5e54274f4f379c7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.