核心 PostgreSQL 发行版包含 表 68.1 中所示的 GiST 运算符类。(附录 F 中描述的一些可选模块提供了其他 GiST 运算符类。)
表 68.1. 内置 GiST 运算符类
名称 | 可索引运算符 | 排序运算符 |
---|---|---|
box_ops |
<< (box, box) |
<-> (box, point) |
&<(盒子,盒子) |
||
&&(盒子,盒子) |
||
&>(盒子,盒子) |
||
>>(盒子,盒子) |
||
~=(盒子,盒子) |
||
@>(盒子,盒子) |
||
<@(盒子,盒子) |
||
&<|(盒子,盒子) |
||
<<|(盒子,盒子) |
||
|>>(盒子,盒子) |
||
|&>(盒子,盒子) |
||
~(盒子,盒子) |
||
@(盒子,盒子) |
||
circle_ops |
<<(圆,圆) |
<->(圆,点) |
&<(圆,圆) |
||
&>(圆,圆) |
||
>>(圆,圆) |
||
<@(圆,圆) |
||
@>(圆,圆) |
||
~=(圆,圆) |
||
&&(圆,圆) |
||
|>>(圆,圆) |
||
<<|(圆,圆) |
||
&<|(圆,圆) |
||
|&>(圆,圆) |
||
@(圆,圆) |
||
~(圆,圆) |
||
inet_ops |
<<(inet,inet) |
|
<<=(inet,inet) |
||
>>(inet,inet) |
||
>>=(inet,inet) |
||
=(inet,inet) |
||
<>(inet,inet) |
||
<(inet,inet) |
||
<=(inet,inet) |
||
>(inet,inet) |
||
>=(inet,inet) |
||
&&(inet,inet) |
||
multirange_ops |
=(anymultirange,anymultirange) |
|
&&(anymultirange,anymultirange) |
||
&&(anymultirange,anyrange) |
||
@>(anymultirange,anyelement) |
||
@>(anymultirange,anymultirange) |
||
@>(anymultirange,anyrange) |
||
<@(anymultirange,anymultirange) |
||
<@(anymultirange,anyrange) |
||
<<(anymultirange,anymultirange) |
||
<<(anymultirange,anyrange) |
||
>>(anymultirange,anymultirange) |
||
>>(anymultirange,anyrange) |
||
&<(anymultirange,anymultirange) |
||
&<(anymultirange,anyrange) |
||
&>(anymultirange,anymultirange) |
||
&>(anymultirange,anyrange) |
||
-|-(anymultirange,anymultirange) |
||
-|-(anymultirange,anyrange) |
||
point_ops |
|>>(点,点) |
<->(点,点) |
<<(点,点) |
||
>>(点,点) |
||
<<|(点,点) |
||
~=(点,点) |
||
<@(点,盒子) |
||
<@(点,多边形) |
||
<@(点,圆) |
||
poly_ops |
<<(多边形,多边形) |
<->(多边形,点) |
&<(多边形,多边形) |
||
&>(多边形,多边形) |
||
>>(多边形,多边形) |
||
<@(多边形,多边形) |
||
@>(多边形,多边形) |
||
~=(多边形,多边形) |
||
&&(多边形,多边形) |
||
<<|(多边形,多边形) |
||
&<|(多边形,多边形) |
||
|&>(多边形,多边形) |
||
|>>(多边形,多边形) |
||
@(多边形,多边形) |
||
~(多边形,多边形) |
||
range_ops |
=(任意范围,任意范围) |
|
&&(任意范围,任意范围) |
||
&&(任意范围,任意多范围) |
||
@>(任意范围,任意元素) |
||
@>(任意范围,任意范围) |
||
@>(任意范围,任意多范围) |
||
<@(任意范围,任意范围) |
||
<@(任意范围,任意多范围) |
||
<<(任意范围,任意范围) |
||
<<(任意范围,任意多范围) |
||
>>(任意范围,任意范围) |
||
>>(任意范围,任意多范围) |
||
&<(任意范围,任意范围) |
||
&<(任意范围,任意多范围) |
||
&>(任意范围,任意范围) |
||
&>(任意范围,任意多范围) |
||
-|-(任意范围,任意范围) |
||
-|-(任意范围,任意多范围) |
||
tsquery_ops |
<@(tsquery,tsquery) |
|
@>(tsquery,tsquery) |
||
tsvector_ops |
@@(tsvector,tsquery) |
由于历史原因,inet_ops
运算符类不是 inet
和 cidr
类型的默认类。要使用它,请在 CREATE INDEX
中提及类名,例如
CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);
如果您在文档中看到任何不正确、与您对特定功能的体验不符或需要进一步澄清的内容,请使用 此表单 报告文档问题。