Constructs a polygon from a text representation.
NEW ST_Polygon(text-representation[, srid])
text-representation
LONG VARCHAR
A string containing the text representation of a polygon. The input can be in any supported text input format, including Well Known Text (WKT) or Extended Well Known Text (EWKT).
srid
INT
The SRID of the result. If not specified, the default is 0.
Constructs a polygon from a character string representation. The database server determines the input format by inspecting the provided string.
SQL/MM (ISO/IEC 13249-3: 2006) 8.3.2
The following returns Polygon ((-5 -5, 5 -5, 0 5, -5 -5), (-2 -2, -2 0, 2 0, 2 -2, -2 -2)).
SELECT NEW ST_Polygon('Polygon ((-5 -5, 5 -5, 0 5, -5 -5), (-2 -2, -2 0, 2 0, 2 -2, -2 -2))')