Tests if the ST_MultiCurve value is closed. A curve is closed if the start and end points are coincident. A multicurve is closed if it is non-empty and has an empty boundary.
SELECT NEW ST_MultiCurve( 'MultiCurve((0 0, 1 1))' ).ST_IsClosed()
The following returns all rows in multicurve_table that have closed geometries. This example assumes the geometry column has type ST_MultiCurve or ST_MultiLineString.
SELECT * FROM multicurve_table WHERE geometry.ST_IsClosed() = 1
SQL/MM (ISO/IEC 13249-3: 2006) 9.3.3