> 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/catalogs/catalog-pg-opfamily.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 52.35. pg\_opfamily \#

### 52.35. `pg_opfamily` [#](#catalog-pg-opfamily) <a href="#catalog-pg-opfamily" id="catalog-pg-opfamily"></a>

目錄 `pg_opfamily` 定義運算子家族。每個運算子家族是一組運算子及相關支援常式的集合，這些運算子與常式實作了為特定索引存取方法所指定的語意。此外，同一家族中的運算子全都以存取方法所指定的方式彼此「相容」。運算子家族的概念讓跨資料型別的運算子可以搭配索引使用，並可運用存取方法語意的知識對其進行推理。

[第 36.16 節](https://docs.postgresql.tw/19/server-programming/extend/xindex.md)詳細說明了運算子家族。

#### 表 52.35. `pg_opfamily` 欄位 [#](#catalog-pg-opfamily-columns) <a href="#catalog-pg-opfamily-columns" id="catalog-pg-opfamily-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>資料列識別碼</p>                                                                                                                                                       |
| <p><code>opfmethod</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-am.md"><code>pg\_am</code></a>.<code>oid</code>）</p><p>此運算子家族所適用的索引存取方法</p>             |
| <p><code>opfname</code> <code>name</code></p><p>此運算子家族的名稱</p>                                                                                                                                               |
| <p><code>opfnamespace</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-namespace.md"><code>pg\_namespace</code></a>.<code>oid</code>）</p><p>此運算子家族的命名空間</p> |
| <p><code>opfowner</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md"><code>pg\_authid</code></a>.<code>oid</code>）</p><p>此運算子家族的擁有者</p>            |

<br>

定義運算子家族的大部分資訊並不在其 `pg_opfamily` 資料列中，而是在 [`pg_amop`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-amop.md)、 [`pg_amproc`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-amproc.md) 與 [`pg_opclass`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-opclass.md) 中的相關資料列。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/catalog-pg-opfamily.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/catalogs/catalog-pg-opfamily.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.
