- In addition, any range type that is meant to be used with GiST indexes
+ In addition, any range type that is meant to be used with GiST or SP-GiST indexes
should define a subtype difference, or subtype_diff>, function.
- (A GiST index will still work without subtype_diff>, but it is
+ (the index will still work without subtype_diff>, but it is
likely to be considerably less efficient than if a difference function is
provided.) The subtype difference function takes two input values of the
subtype, and returns their difference (i.e., X> minus
- gist">
+ indexing">
Indexing
- GiST indexes can be created for table columns of range types.
- For instance:
+ GiST and SP-GiST indexes can be created for table columns of range types.
+ For instance, to create a GiST index:
CREATE INDEX reservation_idx ON reservation USING gist (during);
- A GiST index can accelerate queries involving these range operators:
+ A GiST or SP-GiST index can accelerate queries involving these range operators:
=>,
&&>,
<@>,