#27437: Can't create GinIndex on ArrayField(CITextField)
-------------------------------------+-------------------------------------
               Reporter:  vad        |          Owner:  (none)
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  master
  contrib.postgres                   |       Keywords:  postgres, indexes,
               Severity:  Normal     |  gin, citext, arrays
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I have a model like:

 {{{#!python
 class MyModel(models.Model):
     column = ArrayField(
         CITextField(max_length=255),
     )

     class Meta:
         indexes = [
             GinIndex(fields=['column'], name='mygin')
         ]
 }}}

 Migration fails because:

 {{{
 django.db.utils.ProgrammingError: data type citext[] has no default
 operator class for access method "gin"
 HINT:  You must specify an operator class for the index or define a
 default operator class for the data type.
 }}}

 full trace on this
 [https://gist.github.com/vad/7f0414b8a52bb288f64f6c1df6006b35 gist]. To
 solve this issue an Operator Class
 [http://stackoverflow.com/a/20102665/690696 must be created]

--
Ticket URL: <https://code.djangoproject.com/ticket/27437>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/046.f617d821647d8b27565c086d65a2f339%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to