> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/internals/indextypes/gist/gist-builtin-opclasses.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 65.2.2. 內建運算子類別

## 65.2.2. 內建運算子類別 [#](#gist-builtin-opclasses) <a href="#gist-builtin-opclasses" id="gist-builtin-opclasses"></a>

核心 PostgreSQL 發行版本包含[表 65.1](#gist-builtin-opclasses-table) 所列的 GiST 運算子類別。（[附錄 F](https://docs.postgresql.tw/19/appendixes/contrib.md) 中所述的部分選用模組提供了額外的 GiST 運算子類別。）

### 表 65.1. 內建 GiST 運算子類別 [#](#gist-builtin-opclasses-table) <a href="#gist-builtin-opclasses-table" id="gist-builtin-opclasses-table"></a>

<table><thead><tr><th>名稱</th><th>可索引運算子</th><th>排序運算子</th></tr></thead><tbody><tr><td rowspan="12"><code>box_ops</code></td><td><code>&#x3C;&#x3C; (box, box)</code></td><td rowspan="12"><code>&#x3C;-> (box, point)</code></td></tr><tr><td><code>&#x26;&#x3C; (box, box)</code></td></tr><tr><td><code>&#x26;&#x26; (box, box)</code></td></tr><tr><td><code>&#x26;> (box, box)</code></td></tr><tr><td><code>>> (box, box)</code></td></tr><tr><td><code>~= (box, box)</code></td></tr><tr><td><code>@> (box, box)</code></td></tr><tr><td><code>&#x3C;@ (box, box)</code></td></tr><tr><td><code>&#x26;&#x3C;| (box, box)</code></td></tr><tr><td><code>&#x3C;&#x3C;| (box, box)</code></td></tr><tr><td><code>|>> (box, box)</code></td></tr><tr><td><code>|&#x26;> (box, box)</code></td></tr><tr><td rowspan="12"><code>circle_ops</code></td><td><code>&#x3C;&#x3C; (circle, circle)</code></td><td rowspan="12"><code>&#x3C;-> (circle, point)</code></td></tr><tr><td><code>&#x26;&#x3C; (circle, circle)</code></td></tr><tr><td><code>&#x26;> (circle, circle)</code></td></tr><tr><td><code>>> (circle, circle)</code></td></tr><tr><td><code>&#x3C;@ (circle, circle)</code></td></tr><tr><td><code>@> (circle, circle)</code></td></tr><tr><td><code>~= (circle, circle)</code></td></tr><tr><td><code>&#x26;&#x26; (circle, circle)</code></td></tr><tr><td><code>|>> (circle, circle)</code></td></tr><tr><td><code>&#x3C;&#x3C;| (circle, circle)</code></td></tr><tr><td><code>&#x26;&#x3C;| (circle, circle)</code></td></tr><tr><td><code>|&#x26;> (circle, circle)</code></td></tr><tr><td rowspan="11"><code>inet_ops</code></td><td><code>&#x3C;&#x3C; (inet, inet)</code></td><td rowspan="11"> </td></tr><tr><td><code>&#x3C;&#x3C;= (inet, inet)</code></td></tr><tr><td><code>>> (inet, inet)</code></td></tr><tr><td><code>>>= (inet, inet)</code></td></tr><tr><td><code>= (inet, inet)</code></td></tr><tr><td><code>&#x3C;> (inet, inet)</code></td></tr><tr><td><code>&#x3C; (inet, inet)</code></td></tr><tr><td><code>&#x3C;= (inet, inet)</code></td></tr><tr><td><code>> (inet, inet)</code></td></tr><tr><td><code>>= (inet, inet)</code></td></tr><tr><td><code>&#x26;&#x26; (inet, inet)</code></td></tr><tr><td rowspan="18"><code>multirange_ops</code></td><td><code>= (anymultirange, anymultirange)</code></td><td rowspan="18"> </td></tr><tr><td><code>&#x26;&#x26; (anymultirange, anymultirange)</code></td></tr><tr><td><code>&#x26;&#x26; (anymultirange, anyrange)</code></td></tr><tr><td><code>@> (anymultirange, anyelement)</code></td></tr><tr><td><code>@> (anymultirange, anymultirange)</code></td></tr><tr><td><code>@> (anymultirange, anyrange)</code></td></tr><tr><td><code>&#x3C;@ (anymultirange, anymultirange)</code></td></tr><tr><td><code>&#x3C;@ (anymultirange, anyrange)</code></td></tr><tr><td><code>&#x3C;&#x3C; (anymultirange, anymultirange)</code></td></tr><tr><td><code>&#x3C;&#x3C; (anymultirange, anyrange)</code></td></tr><tr><td><code>>> (anymultirange, anymultirange)</code></td></tr><tr><td><code>>> (anymultirange, anyrange)</code></td></tr><tr><td><code>&#x26;&#x3C; (anymultirange, anymultirange)</code></td></tr><tr><td><code>&#x26;&#x3C; (anymultirange, anyrange)</code></td></tr><tr><td><code>&#x26;> (anymultirange, anymultirange)</code></td></tr><tr><td><code>&#x26;> (anymultirange, anyrange)</code></td></tr><tr><td><code>-|- (anymultirange, anymultirange)</code></td></tr><tr><td><code>-|- (anymultirange, anyrange)</code></td></tr><tr><td rowspan="8"><code>point_ops</code></td><td><code>|>> (point, point)</code></td><td rowspan="8"><code>&#x3C;-> (point, point)</code></td></tr><tr><td><code>&#x3C;&#x3C; (point, point)</code></td></tr><tr><td><code>>> (point, point)</code></td></tr><tr><td><code>&#x3C;&#x3C;| (point, point)</code></td></tr><tr><td><code>~= (point, point)</code></td></tr><tr><td><code>&#x3C;@ (point, box)</code></td></tr><tr><td><code>&#x3C;@ (point, polygon)</code></td></tr><tr><td><code>&#x3C;@ (point, circle)</code></td></tr><tr><td rowspan="12"><code>poly_ops</code></td><td><code>&#x3C;&#x3C; (polygon, polygon)</code></td><td rowspan="12"><code>&#x3C;-> (polygon, point)</code></td></tr><tr><td><code>&#x26;&#x3C; (polygon, polygon)</code></td></tr><tr><td><code>&#x26;> (polygon, polygon)</code></td></tr><tr><td><code>>> (polygon, polygon)</code></td></tr><tr><td><code>&#x3C;@ (polygon, polygon)</code></td></tr><tr><td><code>@> (polygon, polygon)</code></td></tr><tr><td><code>~= (polygon, polygon)</code></td></tr><tr><td><code>&#x26;&#x26; (polygon, polygon)</code></td></tr><tr><td><code>&#x3C;&#x3C;| (polygon, polygon)</code></td></tr><tr><td><code>&#x26;&#x3C;| (polygon, polygon)</code></td></tr><tr><td><code>|&#x26;> (polygon, polygon)</code></td></tr><tr><td><code>|>> (polygon, polygon)</code></td></tr><tr><td rowspan="18"><code>range_ops</code></td><td><code>= (anyrange, anyrange)</code></td><td rowspan="18"> </td></tr><tr><td><code>&#x26;&#x26; (anyrange, anyrange)</code></td></tr><tr><td><code>&#x26;&#x26; (anyrange, anymultirange)</code></td></tr><tr><td><code>@> (anyrange, anyelement)</code></td></tr><tr><td><code>@> (anyrange, anyrange)</code></td></tr><tr><td><code>@> (anyrange, anymultirange)</code></td></tr><tr><td><code>&#x3C;@ (anyrange, anyrange)</code></td></tr><tr><td><code>&#x3C;@ (anyrange, anymultirange)</code></td></tr><tr><td><code>&#x3C;&#x3C; (anyrange, anyrange)</code></td></tr><tr><td><code>&#x3C;&#x3C; (anyrange, anymultirange)</code></td></tr><tr><td><code>>> (anyrange, anyrange)</code></td></tr><tr><td><code>>> (anyrange, anymultirange)</code></td></tr><tr><td><code>&#x26;&#x3C; (anyrange, anyrange)</code></td></tr><tr><td><code>&#x26;&#x3C; (anyrange, anymultirange)</code></td></tr><tr><td><code>&#x26;> (anyrange, anyrange)</code></td></tr><tr><td><code>&#x26;> (anyrange, anymultirange)</code></td></tr><tr><td><code>-|- (anyrange, anyrange)</code></td></tr><tr><td><code>-|- (anyrange, anymultirange)</code></td></tr><tr><td rowspan="2"><code>tsquery_ops</code></td><td><code>&#x3C;@ (tsquery, tsquery)</code></td><td rowspan="2"> </td></tr><tr><td><code>@> (tsquery, tsquery)</code></td></tr><tr><td><code>tsvector_ops</code></td><td><code>@@ (tsvector, tsquery)</code></td><td> </td></tr></tbody></table>

<br>

由於歷史因素，`inet_ops` 運算子類別並不是 `inet` 與 `cidr` 型別的預設類別。若要使用它，請在 `CREATE INDEX` 中指明該類別名稱，例如

```

CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);
```

[返回 65.2. GiST 索引](https://docs.postgresql.tw/19/internals/indextypes/gist.md#gist)

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/gist.html)（原文版本：18.6；核對日期：2026-10-17）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/internals/indextypes/gist/gist-builtin-opclasses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
