Changes between Version 1 and Version 2 of Ticket #34293, comment 5
- Timestamp:
- Jan 25, 2023, 8:22:04 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34293, comment 5
v1 v2 34 34 > The order doesn't matter. It does not necessarily determine in which order the constraints are checked. 35 35 36 which means that depending on the order in which PostgreSQL choose to check constraints the user could either get an `IntegrityError` or a `DataError` depending which attempting to insert data that violates one constraint and provides invalid data for the other. 36 which means that depending on the order in which PostgreSQL choose to check constraints the user could either get an `IntegrityError` or a `DataError` depending which attempting to insert data that violates one constraint and provides invalid data for the other. `Model.validate_constraints` chooses to validate all of them as it doesn't build on top of this ordering assumption. 37 38 To me this is a case of ''wontfix'' to avoid having users continue to build flawed assumptions about the order of definitions of their `Meta.constraints` entries.