64.2. 内置操作员类别
核心 PostgreSQL 发行版包括Table 64.1中显示的 GiST 运算符类。 (Appendix F中描述的一些可选模块提供了其他 GiST 运算符类。)
表 64.1. 内置 GiST 操作员类别
Name | 索引数据类型 | Indexable Operators | Ordering Operators |
---|---|---|---|
box_ops | box | && &> &< &<| >> << <<| <@ @> @ |&> |>> ~ ~= | |
circle_ops | circle | && &> &< &<| >> << <<| <@ @> @ |&> |>> ~ ~= | <-> |
inet_ops | inet , cidr | && >> >>= > >= <> << <<= < <= = | |
point_ops | point | >> >^ << <@ <@ <@ <^ ~= | <-> |
poly_ops | polygon | && &> &< &<| >> << <<| <@ @> @ |&> |>> ~ ~= | <-> |
range_ops | 任何范围类型 | && &> &< >> << <@ -|- = @> @> | |
tsquery_ops | tsquery | <@ @> | |
tsvector_ops | tsvector | @@ |
出于历史原因,inet_ops
运算符类别不是类型inet
和cidr
的默认类别。要使用它,请在CREATE INDEX
中提及类名,例如
CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);