> 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/15/internals/system-catalogs/pg_partitioned_table.md).

# 53.37. pg\_partitioned\_table

## 53.37. pg\_partitioned\_table

The catalog `pg_partitioned_table` stores information about how tables are partitioned.

**Table 53.37. `pg_partitioned_table` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>partrelid</code> <code>oid</code> (references <a href="/15/internals/system-catalogs/pg_class.md"><code>pg\_class</code></a>.<code>oid</code>)</p><p>The OID of the <a href="/15/internals/system-catalogs/pg_class.md"><code>pg\_class</code></a> entry for this partitioned table</p>                                                                                                                                                                                                                                                                     |
| <p><code>partstrat</code> <code>char</code></p><p>Partitioning strategy; <code>h</code> = hash partitioned table, <code>l</code> = list partitioned table, <code>r</code> = range partitioned table</p>                                                                                                                                                                                                                                                                                                                                                              |
| <p><code>partnatts</code> <code>int2</code></p><p>The number of columns in the partition key</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| <p><code>partdefid</code> <code>oid</code> (references <a href="/15/internals/system-catalogs/pg_class.md"><code>pg\_class</code></a>.<code>oid</code>)</p><p>The OID of the <a href="/15/internals/system-catalogs/pg_class.md"><code>pg\_class</code></a> entry for the default partition of this partitioned table, or zero if this partitioned table does not have a default partition</p>                                                                                                                                                                       |
| <p><code>partattrs</code> <code>int2vector</code> (references <a href="/15/internals/system-catalogs/pg_attribute.md"><code>pg\_attribute</code></a>.<code>attnum</code>)</p><p>This is an array of <code>partnatts</code> values that indicate which table columns are part of the partition key. For example, a value of <code>1 3</code> would mean that the first and the third table columns make up the partition key. A zero in this array indicates that the corresponding partition key column is an expression, rather than a simple column reference.</p> |
| <p><code>partclass</code> <code>oidvector</code> (references <a href="/15/internals/system-catalogs/pg_opclass.md"><code>pg\_opclass</code></a>.<code>oid</code>)</p><p>For each column in the partition key, this contains the OID of the operator class to use. See <a href="/15/internals/system-catalogs/pg_opclass.md"><code>pg\_opclass</code></a> for details.</p>                                                                                                                                                                                            |
| <p><code>partcollation</code> <code>oidvector</code> (references <a href="/15/internals/system-catalogs/pg_collation.md"><code>pg\_collation</code></a>.<code>oid</code>)</p><p>For each column in the partition key, this contains the OID of the collation to use for partitioning, or zero if the column is not of a collatable data type.</p>                                                                                                                                                                                                                    |
| <p><code>partexprs</code> <code>pg\_node\_tree</code></p><p>Expression trees (in <code>nodeToString()</code> representation) for partition key columns that are not simple column references. This is a list with one element for each zero entry in <code>partattrs</code>. Null if all partition key columns are simple references.</p>                                                                                                                                                                                                                            |

***

原文：[PostgreSQL 15.19 Documentation](/15/internals/system-catalogs/pg_partitioned_table.md)（英文原文，待翻譯）


---

# 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/15/internals/system-catalogs/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.
