Using Django 1.8, psycopg2 2.6 and PostgreSQL 9.4.1.
I have a model with a models.TextField(unique=True, db_index=False,
primary_key=False) field in it.
I understand that an index is created because of the comment shown in
this code:
https://github.com/django/django/blob/master/django/db/backends/postgresql_psycopg2/schema.py#L17
but even though the index is suggested for LIKE queries using non C
locales I would have thought the addition of db_index=False would have
negated that.
I feel that this is a bug. An index is not required by PostgreSQL on a
unique constraint (it may be recommended but that is beside the point)
and if I explicitly state db_index=False then the Django ORM should
remove the index even though the index is recommended.
Thoughts?
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/552DB881.1090006%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.