If the geometry-expression is of type ST_Polygon, returns the geometry-expression.
If the geometry-expression is of type ST_CurvePolygon, returns geometry-expression.ST_CurvePolyToPoly().
If the geometry-expression is a geometry collection with a single element of type ST_CurvePolygon, returns that element.
If the geometry-expression is the empty set, returns an empty set of type ST_Polygon.
Otherwise, raises an exception condition.
The spatial reference system identifier of the result is the same as the spatial reference system of the geometry-expression.
Convert the geometry to a polygon.
The logic is equivalent to that used for CAST(geometry-expressionAS ST_Polygon ).
If the geometry-expression is a curve polygon, it is approximated using ST_CurvePolyToPoly().
If geometry-expression is already known to be an ST_Polygon value, it is more
efficient to use TREAT( geometry-expression AS ST_Polygon ) than the