pg_partition_templates

The pg_partition_templates system view is used to show the subpartitions that were created using a subpartition template.

Table 1. pg_catalog.pg_partition_templates

columntypereferencesdescription
schemanamename The name of the schema the partitioned table is in.
tablenamename The table name of the top-level parent table.
partitionnamename The name of the subpartition (this is the name to use if referring to the partition in an ALTER TABLE command). NULL if the partition was not given a name at create time or generated by an EVERY clause.
partitiontypetext The type of subpartition (range or list).
partitionlevelsmallint The level of this subpartition in the hierarchy.
partitionrankbigint For range partitions, the rank of the partition compared to other partitions of the same level.
partitionpositionsmallint The rule order position of this subpartition.
partitionlistvaluestext For list partitions, the list value(s) associated with this subpartition.
partitionrangestarttext For range partitions, the start value of this subpartition.
partitionstartinclusiveboolean T if the start value is included in this subpartition. F if it is excluded.
partitionrangeendtext For range partitions, the end value of this subpartition.
partitionendinclusiveboolean T if the end value is included in this subpartition. F if it is excluded.
partitioneveryclausetext The EVERY clause (interval) of this subpartition.
partitionisdefaultboolean T if this is a default subpartition, otherwise F.
partitionboundarytext The entire partition specification for this subpartition.