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).

Table 1. pg_catalog.pg_partition_rule

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.
parnamename The given name of this partition.
parisdefaultboolean Whether or not this partition is a default partition.
parruleordsmallint For range partitioned tables, the rank of this partition on this level of the partition hierarchy.
parrangestartinclboolean For range partitioned tables, whether or not the starting value is inclusive.
parrangeendinclboolean For range partitioned tables, whether or not the ending value is inclusive.
parrangestarttext For range partitioned tables, the starting value of the range.
parrangeendtext For range partitioned tables, the ending value of the range.
parrangeeverytext For range partitioned tables, the interval value of the EVERY clause.
parlistvaluestext For list partitioned tables, the list of values assigned to this partition.
parreloptionstext An array describing the storage characteristics of the particular partition.