↑↓ select ↵ open ⌫ change scope Open full search

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

System Catalogs / System catalogs

pg_partitioned_table

Read the PG 18 manual

The catalog pg_partitioned_table stores information about how tables are partitioned.

Reading PG 18current·documented in 11 of 24 versions, 10 to 20

Kind
System catalogs
Columns in this snapshot
8
Definition source
English manual
Metadata snapshot
18.6

Columns 8

As listed in the PostgreSQL 18 manual.

ColumnTypeDescription / reference
partrelidoidNOT NULLThe OID of the pg_class entry for this partitioned table
pg_class.oid
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
pg_class.oid
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.
pg_attribute.attnum
partclassoidvectorNOT NULLFor each column in the partition key, this contains the OID of the operator class to use. See pg_opclass for details.
pg_opclass.oid
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.
pg_collation.oid
partexprspg_node_treeExpression 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
  1. 13 → 14 reworded
  2. 10 → 11 changed
  3. 9.6 → 10 added

Definition snapshot: english-manuals:c21a4a78f2a795b9eee1cf075fc… · English manual source