SYSTEM CATALOGS / SYSTEM CATALOGS
pg_partitioned_table
Read PG 18 manual ↗The catalog pg_partitioned_table stores information about how tables are partitioned.
- Kind
- System catalogs
- Columns in this snapshot
- 8
- Definition source
- English manual
Columns 8
| Column | Type | Description / reference |
|---|---|---|
partrelid | oid | The OID of the pg_class entry for this partitioned table pg_class.oid |
partstrat | char | Partitioning strategy; h = hash partitioned table, l = list partitioned table, r = range partitioned table |
partnatts | int2 | The number of columns in the partition key |
partdefid | oid | The OID of the pg_class entry for the default partition of this partitioned table, or zero if this partitioned table does not have a default partition pg_class.oid |
partattrs | int2vector | This is an array of partnatts values that indicate which table columns are part of the partition key. For example, a value of 1 3 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. pg_attribute.attnum |
partclass | oidvector | For each column in the partition key, this contains the OID of the operator class to use. See pg_opclass for details. pg_opclass.oid |
partcollation | oidvector | 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. pg_collation.oid |
partexprs | pg_node_tree | Expression trees (in nodeToString() representation) for partition key columns that are not simple column references. This is a list with one element for each zero entry in partattrs. Null if all partition key columns are simple references. |
Column history across versions
Version history 3
- PG 13 → 14changed
- PG 10 → 11changed
- PG 9.6 → 10added
Definition snapshot: english-manuals:a81d6f5c974e279a32193f57a69… · English manual source