ST_PatchN — Restituisce il tipo di geometria per il valore ST_Geometry.
geometry ST_PatchN(geometry  geomA, integer  n);
Returns the 1-based Nth geometry (face) if the geometry is a POLYHEDRALSURFACE or POLYHEDRALSURFACEM. Otherwise, returns NULL. This returns the same answer as ST_GeometryN for PolyhedralSurfaces. Using ST_GeometryN is faster.
                 
               | 
              |
| 
                 L'indice parte da 1.  | 
            
                 
               | 
              |
| 
                 Se volete estrarre tutte le geometria, ST_Dump è più efficiente e funziona anche nel caso di geometrie singole.  | 
            
Disponibilità: 2.0.0
            
 Questo metodo implementa la specifica SQL/MM.  SQL-MM ISO/IEC 13249-3: 8.5
            
 Questa funzione supporta il 3d e non distrugge gli z-index. 
            
 Questa funzione supporta le Polyhedral Surface. 
--Extract the 2nd face of the polyhedral surface
SELECT ST_AsEWKT(ST_PatchN(geom, 2)) As geomewkt
FROM (
VALUES (ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
        ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
        ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
        ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')) ) As foo(geom);
              geomewkt
---+-----------------------------------------
 POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))
      ST_AsEWKT, ST_GeomFromEWKT, ST_Dump, ST_GeometryN, ST_NumGeometries