Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198.
Existing Python UDFs will continue to function until June 30, 2026. For more information, see the
blog post
ST_IsRing
ST_IsRing returns true if the input linestring is a ring. A linestring is a ring if it is closed and simple.
Syntax
ST_IsRing(geom)
Arguments
- geom
-
A value of data type
GEOMETRYor an expression that evaluates to aGEOMETRYtype. The geometry must be aLINESTRING.
Return type
BOOLEAN
If geom is not a LINESTRING, then an error is returned.
Examples
The following SQL checks if the specified linestring is a ring.
SELECT ST_IsRing(ST_GeomFromText('linestring(0 0, 1 1, 1 2, 0 0)'));
st_isring
-----------
true