Is there a PostGIS function that creates polygons from multiple line segments?
I want to convert the pictured thirteen lines to four polygons. All lines belong to the table "boundary" (gid, geom). I've categorized them by the gid column for a better illustration.
Is ST_MakePolygon what I'm looking for? Can anyone help me with the SQL syntax that QGIS requires for loading the polygons?
Edit: changed "closed line geometries" to "multiple line segments"