I have a postgis table containing linestring geometries. Some of these linestrings are in fact closed polygon. Is there a function to convert these closed linestring to a polygon?