Skip to content
← Catalog atlas / pg_partitioned_table

SYSTEM CATALOG · System catalog

pg_partitioned_table

The catalog pg_partitioned_table stores information about how tables are partitioned.

First seen PG 10Last seen PG 19Columns 8

Checked column by column against a PostgreSQL 18.6 instance · Raw measurement record ↗

Columns PostgreSQL 18

pg_partitioned_table
COLUMNTYPEDESCRIPTION
partrelid oidNOT NULL The OID of the pg_class entry for this partitioned tableReferences:pg_class.oid
partstrat "char"NOT NULLDocumented as:char Partitioning strategy; h = hash partitioned table, l = list partitioned table, r = range partitioned table
partnatts smallintNOT NULLDocumented as:int2 The number of columns in the partition key
partdefid oidNOT NULL 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 partitionReferences:pg_class.oid
partattrs int2vectorNOT NULL 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.References:pg_attribute.attnum
partclass oidvectorNOT NULL For each column in the partition key, this contains the OID of the operator class to use. See pg_opclass for details.References:pg_opclass.oid
partcollation oidvectorNOT NULL 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.References: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.

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Common system columns 6

System attributes PostgreSQL provides, normally not expanded by SELECT *. Kept separately so they are not mixed in with ordinary columns.

ColumnsTypeattnum
tableoidoid-6
cmaxcid-5
xmaxxid-4
cmincid-3
xminxid-2
ctidtid-1

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
partrelid
partstrat
partnatts
partattrs
partclass
partcollation
partexprs
partdefid

9.0 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 14 ← 13

2 column description updates

PostgreSQL 11 ← 10

+ partdefid1 column description updates

PostgreSQL 10 ← 9.6Catalog added

+ partrelid+ partstrat+ partnatts+ partattrs+ partclass+ partcollation+ partexprs

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.