I just wanna inject a comment about performance here.<br>
<br>
Using GeometryN (or ST_GeometryN) incurs a significant penalty,
especially in terms of memory when i was using it. ST_Dump performs
*much* better.<br>
<br>
>From searches on the internet i concluded that the standard way that
geometries are passed between functions by-value. So invoking GeometryN
N times becomes rather expensive for large geometries.<br>
<br>
ST_Dump returns an array of information from which you can easily extract the parts:<br>
<br>
  SELECT dump.geom FROM ST_Dump(orig_geom) as dump;<br clear="all"><br>-- <br>Helge Jensen<br>Partner & Senior Software Developer<br><br><br>