受支持版本: 16 / 15 / 14

65.2. 内置操作符类 #

PostgreSQL 核心发布包含 Table 65.1 所示的 GIN 操作符类。 (在 Appendix F 中描述的一些可选模块还提供额外的 GIN 操作符类。)

Table 65.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)

在用于类型 jsonb 的两个操作符类中,jsonb_ops 是默认项。jsonb_path_ops 支持的操作符较少,但对这些操作符提供更好的性能。 详见 Section 8.14.4

提交更正

如果您发现文档中有不正确的内容、与您使用特定功能的经验不符或需要进一步说明,请使用此表单来报告文档问题。