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

# 52.37. pg\_partitioned\_table \#

### 52.37. `pg_partitioned_table` [#](#catalog-pg-partitioned-table) <a href="#catalog-pg-partitioned-table" id="catalog-pg-partitioned-table"></a>

目錄 `pg_partitioned_table` 儲存資料表如何分割的相關資訊。

#### 表 52.37. `pg_partitioned_table` 欄位 [#](#catalog-pg-partitioned-table-columns) <a href="#catalog-pg-partitioned-table-columns" id="catalog-pg-partitioned-table-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>partrelid</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-class.md"><code>pg\_class</code></a>.<code>oid</code>）</p><p>此分割資料表在 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-class.md"><code>pg\_class</code></a> 中之項目的 OID</p>                                     |
| <p><code>partstrat</code> <code>char</code></p><p>分割策略；<code>h</code> = 雜湊分割資料表， <code>l</code> = 清單分割資料表，<code>r</code> = 範圍分割資料表</p>                                                                                                                                                                                                               |
| <p><code>partnatts</code> <code>int2</code></p><p>分割鍵中的欄位數</p>                                                                                                                                                                                                                                                                                       |
| <p><code>partdefid</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-class.md"><code>pg\_class</code></a>.<code>oid</code>）</p><p>此分割資料表之預設分割區在 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-class.md"><code>pg\_class</code></a> 中之項目的 OID； 若此分割資料表沒有預設分割區，則為零</p>           |
| <p><code>partattrs</code> <code>int2vector</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-attribute.md"><code>pg\_attribute</code></a>.<code>attnum</code>）</p><p>這是一個含有 <code>partnatts</code> 個值的陣列， 指出哪些資料表欄位屬於分割鍵。例如，值 <code>1 3</code> 表示由資料表的第一個 與第三個欄位構成分割鍵。此陣列中的零表示對應的分割鍵欄位是 運算式，而不是單純的欄位參照。</p>            |
| <p><code>partclass</code> <code>oidvector</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-opclass.md"><code>pg\_opclass</code></a>.<code>oid</code>）</p><p>對分割鍵中的每個欄位，此欄位記錄要使用之運算子類別的 OID。詳細資訊請參閱 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-opclass.md"><code>pg\_opclass</code></a>。</p> |
| <p><code>partcollation</code> <code>oidvector</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-collation.md"><code>pg\_collation</code></a>.<code>oid</code>）</p><p>對分割鍵中的每個欄位，此欄位記錄分割時要使用之定序的 OID； 若該欄位不是可定序的資料型別，則為零。</p>                                                                                           |
| <p><code>partexprs</code> <code>pg\_node\_tree</code></p><p>非單純欄位參照之分割鍵欄位的運算式樹（以 <code>nodeToString()</code> 表示法呈現）。這是一個串列， <code>partattrs</code> 中的每個零項目各對應一個元素。若所有分割鍵欄位 都是單純參照，則為 null。</p>                                                                                                                                                       |

<br>

***

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