If you just need to make sure a MULTILINESTRING
is returned, use ST_Multi
:
ST_Multi — Returns the geometry as a MULTI* geometry. If the geometry is already a MULTI*, it is returned unchanged.
http://postgis.refractions.net/docs/ST_Multi.htmlhttp://postgis.net/docs/ST_Multi.html