Opened 3 years ago

Closed 3 years ago

Last modified 22 months ago

#33342 closed New feature (fixed)

Allow ExclusionConstraint to use the OpClass expression

Reported by: Hannes Ljungberg Owned by: Hannes Ljungberg
Component: contrib.postgres Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

To bring ExclusionConstraint in line with Index and UniqueConstraint I think we should allow usage of the OpClass expressions. To support this we would make ExclusionConstraint use the DDL reference classes instead of a templated SQL string plus usage of the IndexExpression class.

Change History (6)

comment:1 by Hannes Ljungberg, 3 years ago

Has patch: set

comment:2 by Mariusz Felisiak, 3 years ago

Triage Stage: UnreviewedAccepted

Sounds reasonable, maybe we should also deprecate the opclasses argument.

comment:3 by Hannes Ljungberg, 3 years ago

Sounds reasonable, maybe we should also deprecate the opclasses argument.

Yup, that sounds like the proper way forward.

As a side note it would be interesting to look into the possibility of deprecating the fields argument (and by that the opclasses argument) on Index and UniqueConstraint. It would require us to make Index.contains_expressions and UniqueConstraint.contains_expressions a bit smarter.

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 0e656c02:

Fixed #33342 -- Added support for using OpClass() in exclusion constraints.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 59a66f05:

Refs #33342 -- Deprecated ExclusionConstraint.opclasses.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 22 months ago

In 23ec3189:

Refs #33342 -- Removed ExclusionConstraint.opclasses per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top