Skip to content

pg_partition_rule

The pg_partition_rule system catalog table is used to track partitioned tables, their check constraints, and data containment rules. Each row of pg_partition_rule represents either a leaf partition (the bottom level partitions that contain data), or a branch partition (a top or mid-level partition that is used to define the partition hierarchy, but does not contain any data).

columntypereferencesdescription
paroidoidpg_partition.oidRow identifier of the partitioning level (from pg_partition) to which this partition belongs. In the case of a branch partition, the corresponding table (identified by pg_partition_rule) is an empty container table. In case of a leaf partition, the table contains the rows for that partition containment rule.
parchildrelidoidpg_class.oidThe table identifier of the partition (child table).
parparentruleoidpg_partition_rule.paroidThe row identifier of the rule associated with the parent table of this partition.
parnamenameThe given name of this partition.
parisdefaultbooleanWhether or not this partition is a default partition.
parruleordsmallintFor range partitioned tables, the rank of this partition on this level of the partition hierarchy.
parrangestartinclbooleanFor range partitioned tables, whether or not the starting value is inclusive.
parrangeendinclbooleanFor range partitioned tables, whether or not the ending value is inclusive.
parrangestarttextFor range partitioned tables, the starting value of the range.
parrangeendtextFor range partitioned tables, the ending value of the range.
parrangeeverytextFor range partitioned tables, the interval value of the EVERY clause.
parlistvaluestextFor list partitioned tables, the list of values assigned to this partition.
parreloptionstextAn array describing the storage characteristics of the particular partition.

Parent topic: System Catalogs Definitions