Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#33294 closed Bug (invalid)

opclasses missing in PostGIS's 3D geometry indexes

Reported by: Tim Graham Owned by: nobody
Component: GIS Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After 99bc67a9e79256d8a2fcd5742e33a5e79c056539 (refs #32721), the GIST_GEOMETRY_OPS_ND opclass is no longer present for indexes on 3D geometries. You can observe the indexes created while running the test suite and see, for example:

CREATE INDEX "geo3d_city3d_point_id" ON "geo3d_city3d" USING GIST ("point")

instead of

CREATE INDEX "geo3d_city3d_point_id" ON "geo3d_city3d" USING GIST ("point" GIST_GEOMETRY_OPS_ND)

The issue seems to be that when BaseDatabaseSchemaEditor._create_index_sql() calls self._index_columns, it invokes BaseDatabaseSchemaEditor's version (which ignores opclasses) rather than postgresql's.

Attachments (2)

pre_99bc67a9e79256d8a2fcd5742e33a5e79c056539 (5.6 KB ) - added by Mariusz Felisiak 3 years ago.
post_99bc67a9e79256d8a2fcd5742e33a5e79c056539 (5.6 KB ) - added by Mariusz Felisiak 3 years ago.

Download all attachments as: .zip

Change History (4)

by Mariusz Felisiak, 3 years ago

by Mariusz Felisiak, 3 years ago

comment:1 by Mariusz Felisiak, 3 years ago

Resolution: needsinfo
Status: newclosed

Thanks for the report, however it creates exactly the same set of indexes for me 🤔 (see attachments) and it's covered by test_add_3d_field_opclass(). Maybe it's reproducible on a 3rd-party backend.

comment:2 by Tim Graham, 3 years ago

Resolution: needsinfoinvalid
Severity: Release blockerNormal

Sorry for the false alarm, I should have debugged a bit more carefully. The commit in question merely changed behavior in django-cockroachdb.

Note: See TracTickets for help on using tickets.
Back to Top