The pg_partitioned_table catalog provides information about partitioning metadata.
| Column name | Data type | Description |
|---|---|---|
partrelid |
oid (references pg_class.oid) |
The OID of the pg_class entry for the partitioned table. |
partstrat |
char |
The partitioning strategy. The possible values are:
|
partnatts |
int2 |
The number of columns in the partition key. |
partdefid |
oid (references pg_class.oid) |
The OID of the pg_class entry for the default partition of this partitioned table. 0 – No default partition exists. |
partattrs |
int2vector (references pg_attribute.attnum) |
An array of partnatts values indicating which table columns are part of the partition key. 0 – The corresponding key column is an expression rather than a column reference. |
partclass |
oidvector (references pg_opclass.oid) |
The OIDs of the operator classes to apply to each partition key column. |
partcollation |
oidvector (references pg_collation.oid) |
The OIDs of the collations to apply to each partition key column. 0 – The column’s type is not collatable. |
partexprs |
pg_node_tree |
Expression trees, represented in the nodeToString() format, for partition key columns that are expressions rather than simple references. NULL – All key columns are simple references. |