#36694: PostGIS backend silently ignores most Index options (expressions,
condition, include, opclasses)
-------------------------------------+-------------------------------------
     Reporter:  Luciano de la        |                    Owner:  (none)
  Iglesia                            |
         Type:  Bug                  |                   Status:  new
    Component:  GIS                  |                  Version:  5.2
     Severity:  Normal               |               Resolution:
     Keywords:  postgis index        |             Triage Stage:  Accepted
  condition include                  |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * component:  Migrations => GIS
 * keywords:   => postgis index condition include
 * stage:  Unreviewed => Accepted
 * summary:  GistIndex with condition ignores condition =>
     PostGIS backend silently ignores most Index options (expressions,
     condition, include, opclasses)

Comment:

 Confirmed this is a bug in in `django.contrib.gis.db.backends.postgist` (I
 inferred you were using PostGIS given you use
 `contrib.postgres.ArrayField`).

 The `SchemaEditor._create_index_sql` method delegates to
 `._create_spatial_index_sql` to provide some defaults (e.g. `opclasses`)
 but fails to pass along `kwargs` such as `condition`, `include`,
 `expressions`, etc.
 
[https://github.com/django/django/blob/43933a1dca07047e95ec990d9289d0212668009e/django/contrib/gis/db/backends/postgis/schema.py#L98-L121
 It seems broken in multiple ways].
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:2>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019a2dd29f8a-a8e7d836-3f3e-4352-a3b9-f26b99a1f133-000000%40eu-central-1.amazonses.com.

Reply via email to