Re: [Django] #36694: PostGIS backend silently ignores most Index options when targeting a single GeometryField (expressions, condition, include, opclasses)

14 views
Skip to first unread message

Django

unread,
Oct 28, 2025, 10:45:35 PM10/28/25
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (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
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

A workaround in the meantime could be to use `expressions=[F("location")]`
instead of `fields=["location"]`. You might have to explicitly specify
[https://www.postgresql.org/docs/current/gist.html the proper] `opclasses`
though, that would be `point_ops` in your case.
--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 29, 2025, 6:41:52 AM10/29/25
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: assigned
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 Clifford Gama):

* owner: (none) => Clifford Gama
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:5>

Django

unread,
Jan 15, 2026, 10:19:29 AMJan 15
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: assigned
Component: GIS | Version: 5.2
Severity: Normal | Resolution:
Keywords: postgis index | Triage Stage: Accepted
condition include |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/20541 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:6>

Django

unread,
Jun 30, 2026, 2:23:46 PMJun 30
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: assigned
Component: GIS | Version: 5.2
Severity: Normal | Resolution:
Keywords: postgis index | Triage Stage: Accepted
condition include |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Smith):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:7>

Django

unread,
Jul 18, 2026, 5:49:45 PM (3 days ago) Jul 18
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: assigned
Component: GIS | Version: 5.2
Severity: Normal | Resolution:
Keywords: postgis index | Triage Stage: Accepted
condition include |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:8>

Django

unread,
Jul 20, 2026, 9:51:52 AM (22 hours ago) Jul 20
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: assigned
Component: GIS | Version: 5.2
Severity: Normal | Resolution:
Keywords: postgis index | Triage Stage: Ready for
condition include | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:9>

Django

unread,
Jul 20, 2026, 1:32:20 PM (18 hours ago) Jul 20
to django-...@googlegroups.com
#36694: PostGIS backend silently ignores most Index options when targeting a single
GeometryField (expressions, condition, include, opclasses)
-------------------------------------+-------------------------------------
Reporter: Luciano de la | Owner: Clifford
Iglesia | Gama
Type: Bug | Status: closed
Component: GIS | Version: 5.2
Severity: Normal | Resolution: fixed
Keywords: postgis index | Triage Stage: Ready for
condition include | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"76e1bca1311ae7073a1fa4add6f9d19d709f0f09" 76e1bca1]:
{{{#!CommitTicketReference repository=""
revision="76e1bca1311ae7073a1fa4add6f9d19d709f0f09"
Fixed #36694 -- Restored missing Index options in
PostGISSchemaEditor._create_spatial_index_sql().

Thanks Luciano de la Iglesia for the report, and Simon Charette and David
Smith
for the reviews.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36694#comment:10>
Reply all
Reply to author
Forward
0 new messages