ST_MakePolygon(shell = GEOMETRY): Create a POLYGON from a LINESTRING shell.ST_MakePolygon(shell = GEOMETRY, holes = `GEOMETRY[]`): Create a POLYGON from a LINESTRING shell and a list of LINESTRING holes.
SQL examples
SELECT ST_MakePolygon(ST_LineString([ST_Point(0, 0), ST_Point(1, 0), ST_Point(1, 1), ST_Point(0, 0)]));
SELECT ST_MakePolygon(ST_LineString([ST_Point(0, 0), ST_Point(1, 0), ST_Point(1, 1), ST_Point(0, 0)]), [ST_LineString([ST_Point(0.25, 0.25), ST_Point(0.75, 0.25), ST_Point(0.75, 0.75), ST_Point(0.25, 0.25)])]);