Skip to content

pg_partition_columns

The pg_partition_columns system view is used to show the partition key columns of a partitioned table.

columntypereferencesdescription
schemanamenameThe name of the schema the partitioned table is in.
tablenamenameThe table name of the top-level parent table.
columnnamenameThe name of the partition key column.
partitionlevelsmallintThe level of this subpartition in the hierarchy.
position_in_partition_keyintegerFor list partitions you can have a composite (multi-column) partition key. This shows the position of the column in a composite key.

Parent topic: System Catalogs Definitions