ST_Summary(geometry) gives you a brief summary of a geometry telling you how many simple geometries, rings and type of geometry it is.
select ST_Summary(the_geom) from neighborhoods;
Output of the above ran from psql looks like this
MultiPolygon[BS] with 1 elements
Polygon[] with 2 rings
ring 0 has 649 points
ring 1 has 10 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 182 points
MultiPolygon[BS] with 2 elements
Polygon[] with 1 rings
ring 0 has 319 points
Polygon[] with 1 rings
ring 0 has 4 points
MultiPolygon[BS] with 2 elements
Polygon[] with 1 rings
ring 0 has 376 points
Polygon[] with 1 rings
ring 0 has 68 points
MultiPolygon[BS] with 3 elements
Polygon[] with 1 rings
ring 0 has 215 points
Polygon[] with 2 rings
ring 0 has 4 points
ring 1 has 23 points
Polygon[] with 1 rings
ring 0 has 45 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 71 points
MultiPolygon[BS] with 1 elements
Polygon[] with 2 rings
ring 0 has 124 points
ring 1 has 5 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 199 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 197 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 168 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 400 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 355 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 176 points
MultiPolygon[BS] with 1 elements
Polygon[] with 1 rings
ring 0 has 392 points
MultiPolygon[BS] with 1 elements
Polygon[] with 2 rings
ring 0 has 1965 points
ring 1 has 29 points
Post Comments About Summary (pre 1.3.1 name), ST_Summary (+1.3.1)