↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

pg_partitioned_table

The catalog pg_partitioned_table stores information about how tables are partitioned.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
catalog
lang
en
measured attributes
true
metadata release
18.6
runtime columns
partrelid, partstrat, partnatts, partdefid, partattrs, partclass, partcollation, partexprs
runtime verified
false
source
english-manual

Definition PG 18

The catalog pg_partitioned_table stores information about how tables are partitioned.

Catalog columns

ColumnTypeNullabilityDescription
partrelidoidNot nullThe OID of the pg_class entry for this partitioned table
partstratcharNot nullPartitioning strategy; h = hash partitioned table, l = list partitioned table, r = range partitioned table
partnattsint2Not nullThe number of columns in the partition key
partdefidoidNot nullThe 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
partattrsint2vectorNot nullThis 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.
partclassoidvectorNot nullFor each column in the partition key, this contains the OID of the operator class to use. See pg_opclass for details.
partcollationoidvectorNot nullFor 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.
partexprspg_node_treeNullableExpression 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.

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:cc8b7dfae24cd52701502505856a7fb808c8fbd55c8fbf09a663e6a188ec3c4e

Text language: en · catalog-bilingual-repair:cc8b7dfae24cd52701502505856a7fb808c8fbd55c8fbf09a663e6a188ec3c4e