/*
* Must also check that index's opfamily supports the operators we will
* want to apply. (A hash index, for example, will not support ">=".)
- * Currently, only btree supports the operators we need.
+ * Currently, only btree and spgist support the operators we need.
*
* Note: actually, in the Pattern_Prefix_Exact case, we only need "=" so a
* hash index would work. Currently it doesn't seem worth checking for
case OID_TEXT_ICREGEXEQ_OP:
isIndexable =
(opfamily == TEXT_PATTERN_BTREE_FAM_OID) ||
+ (opfamily == TEXT_SPGIST_FAM_OID) ||
(opfamily == TEXT_BTREE_FAM_OID &&
(pstatus == Pattern_Prefix_Exact ||
lc_collate_is_c(idxcollation)));
{
case TEXT_BTREE_FAM_OID:
case TEXT_PATTERN_BTREE_FAM_OID:
+ case TEXT_SPGIST_FAM_OID:
datatype = TEXTOID;
break;
DATA(insert OID = 4015 ( 4000 quad_point_ops PGNSP PGUID ));
DATA(insert OID = 4016 ( 4000 kd_point_ops PGNSP PGUID ));
DATA(insert OID = 4017 ( 4000 text_ops PGNSP PGUID ));
+#define TEXT_SPGIST_FAM_OID 4017
#endif /* PG_OPFAMILY_H */