Name

ST_DumpRings — Returns a set of geometry_dump rows, representing
the exterior and interior rings of a polygon.

Synopsis

geometry_dump[] ST_DumpRings(geometry a_polygon);

Description

This is a set-returning function (SRF). It returns a set of
geometry_dump rows, defined as an integer[]
and a geometry, aliased "path" and "geom" respectively.
The "path" field holds the polygon ring index containing a single integer: 0 for the shell, >0 for holes.
The "geom" field contains the corresponding ring as a polygon.

Availability: PostGIS 1.1.3. Requires PostgreSQL 7.3 or higher.

This only works for POLYGON geometries. It will not work for MULTIPOLYGONS