Skip to content

pg_partition_templates

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

columntypereferencesdescription
schemanamenameThe name of the schema the partitioned table is in.
tablenamenameThe table name of the top-level parent table.
partitionnamenameThe 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.
partitiontypetextThe type of subpartition (range or list).
partitionlevelsmallintThe level of this subpartition in the hierarchy.
partitionrankbigintFor range partitions, the rank of the partition compared to other partitions of the same level.
partitionpositionsmallintThe rule order position of this subpartition.
partitionlistvaluestextFor list partitions, the list value(s) associated with this subpartition.
partitionrangestarttextFor range partitions, the start value of this subpartition.
partitionstartinclusivebooleanT if the start value is included in this subpartition. F if it is excluded.
partitionrangeendtextFor range partitions, the end value of this subpartition.
partitionendinclusivebooleanT if the end value is included in this subpartition. F if it is excluded.
partitioneveryclausetextThe EVERY clause (interval) of this subpartition.
partitionisdefaultbooleanT if this is a default subpartition, otherwise F.
partitionboundarytextThe entire partition specification for this subpartition.

Parent topic: System Catalogs Definitions