select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

pg_partition_root

Read PG 18 manual ↗

Returns the top-most parent of the partition tree to which the given relation belongs.

Signatures & examples

pg_partition_root ( regclass ) → regclass
Returns the top-most parent of the partition tree to which the given relation belongs. Returns NULL if the relation does not exist or is not a partition or partitioned table.
Version history 2
  1. PG 12 → 13changed
  2. PG 11 → 12added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source