WL#11808: Make the SPATIAL keyword optional in index creation

Affects: Server-8.0   —   Status: Complete

Currently, users have to specify that an index should be spatial, e.g.:

CREATE SPATIAL INDEX idx ON table (geometry_column);

If the user doesn't specify SPATIAL, a B-tree index is created. B-tree indexes on geometry columns aren't useful. The only reasonable index to create on a geometry column is an R-tree index.

This WL makes the SPATIAL keyword optional. If the column is a geometry column (column type GEOMETRY, POINT, LINESTRING, POLYGON, GEOMCOLLECTION, MULTIPOINT, MULTILINESTRING or MULTIPOLYGON), an R-tree index is created.

The WL also makes it impossible to use geometry columns in primary keys and unique indexes. It also makes it impossible to create prefix indexes on geometry columns.