Redrock Postgres 搜索 英文
版本: 9.4 / 9.5 / 9.6 / 10 / 11 / 12 / 13 / 14 / 15 / 16

70.2. 内置运算符类 #

核心 PostgreSQL 发行版包含 表 70.1 中所示的 GIN 运算符类。(附录 F 中描述的一些可选模块提供了其他 GIN 运算符类。)

表 70.1. 内置 GIN 运算符类

名称 可索引运算符
array_ops && (anyarray,anyarray)
@> (anyarray,anyarray)
<@ (anyarray,anyarray)
= (anyarray,anyarray)
jsonb_ops @> (jsonb,jsonb)
@? (jsonb,jsonpath)
@@ (jsonb,jsonpath)
? (jsonb,text)
?| (jsonb,text[])
?& (jsonb,text[])
jsonb_path_ops @> (jsonb,jsonb)
@? (jsonb,jsonpath)
@@ (jsonb,jsonpath)
tsvector_ops @@ (tsvector,tsquery)
@@@ (tsvector,tsquery)

对于类型 jsonb 的两个运算符类,jsonb_ops 是默认值。 jsonb_path_ops 支持的运算符较少,但对于这些运算符提供更好的性能。有关详细信息,请参阅 第 8.14.4 节