ST_CompoundCurve If the geometry-expression is of type ST_CompoundCurve, return the geometry-expression. If the geometry-expression is of type ST_LineString or ST_CircularString, return a compound curve containing one element, the geometry-expression. If the geometry-expression is a geometry collection with a single element of type ST_Curve, return that element cast as ST_CompoundCurve. If the geometry-expression is the empty set, return an empty set of type ST_CompoundCurve. Otherwise, raise an exception condition.
Examples
Example 1 –
The following example returns the result CompoundCurve ((0 0, 2 1)).
SELECT NEW ST_LineString( 'LineString( 0 0, 2 1 )' ).ST_ToCompound()