380960 (6) [Avatar] Offline
#1
Whith the list:

CREATE INDEX idx_ch15_ma_roads_geom_rt_number
ON ch15.ma_roads
USING gist(geom,rt_number);


I get the following error:


ERROR: data type character varying has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.

********** Error **********

ERROR: data type character varying has no default operator class for access method "gist"
SQL state: 42704
Hint: You must specify an operator class for the index or define a default operator class for the data type.


I'm running postgresql 9.5
regina.leo (260) [Avatar] Offline
#2
Do

CREATE EXTENSION btree_gist;

Then rerun the index creation.

We may have forgotten to state that in the book since we already had it installed.