#31709: Allow specifying custom operator classes for PostgreSQL exclusion
constraints
-------------------------------------+-------------------------------------
Reporter: Hannes | Owner: Hannes Ljungberg
Ljungberg |
Type: New | Status: assigned
feature |
Component: | Version: master
contrib.postgres |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`ExclusionConstraint` should allow setting `opclasses` just like `Index`:
{{{
class Meta:
constraints = [
ExclusionConstraint(
name='exclude_overlapping'',
expressions=[('circle', RangeOperators.OVERLAPS),
opclasses=['circle_ops'],
)
]
}}}
There are not many choices over the default operator classes on GiST and
SP-GiST indexes. I think the only one is for `point` where one can choose
between `quad_point_ops` and `kd_point_ops`. But users can also create
custom operator classes. I think it makes sense to also provide this
option on `ExclusionConstraint` for consistency.
I've also created https://code.djangoproject.com/ticket/31702 to add
`opclasses` to `UniqueConstraint`.
--
Ticket URL: <https://code.djangoproject.com/ticket/31709>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.8acc62f82625814b32b28f727b09be19%40djangoproject.com.