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).
| Column | Type | References | Description |
|---|---|---|---|
paroid |
oid |
pg_partition.oid |
Row 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 |
parchildrelid |
oid |
pg_class.oid |
The table identifier of the partition (child table) |
parparentrule |
oid |
pg_partition_rule.paroid |
The row identifier of the rule associated with the parent table of this partition |
parname |
name |
— |
The given name of this partition |
parisdefault |
boolean |
— |
Whether or not this partition is a default partition |
parruleord |
smallint |
— |
For range partitioned tables, the rank of this partition on this level of the partition hierarchy |
parrangestartincl |
boolean |
— |
For range partitioned tables, whether or not the starting value is inclusive |
parrangeendincl |
boolean |
— |
For range partitioned tables, whether or not the ending value is inclusive |
parrangestart |
pg_node_tree |
— |
For range partitioned tables, the starting value of the range |
parrangeend |
pg_node_tree |
— |
For range partitioned tables, the ending value of the range |
parrangeevery |
pg_node_tree |
— |
For range partitioned tables, the interval value of the |
parlistvalues |
pg_node_tree |
— |
For list partitioned tables, the list of values assigned to this partition |
parreloptions |
text[] |
— |
An array describing the storage characteristics of the particular partition |
partemplatespace |
oid |
pg_tablespace.oid |
The OID of a tablespace where this partition’s template table is stored |