#19441: No Postgres _like index when unique=True
-------------------------------------+-------------------------------------
Reporter: dyve | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: master
(models, ORM) | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: postgresql | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by dyve):
Now that I;'ve worked with this solution in 1.5c1 I am wondering if this
is 100% correct.
For all systems except for postgres, unique=True makes db_index=True
obsolete
For postgres, you would basically need to add db_index=True to fields with
unique=True if you intend to do LIKE searches on that field.
So the choice is:
- different technical behavior varying by db vendor
- different functional behavior varying by db vendor
Either way this might need some extra documentation. If you don't know
where to look, this is a nasty one to find in Postgres country.
--
Ticket URL: <https://code.djangoproject.com/ticket/19441#comment:9>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.