Function that converts one geometry to another

ST_Polygon constructs a polygon from a closed linestring.

ST_Polygon

ST_Polygon can construct a polygon from a closed linestring.

The linestring will define the exterior ring of the polygon.