

 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 ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# ST\$1IsRing
<a name="ST_IsRing-function"></a>

ST\$1IsRing returns true if the input linestring is a ring. A linestring is a ring if it is closed and simple. 

## Syntax
<a name="ST_IsRing-function-syntax"></a>

```
ST_IsRing(geom)
```

## Arguments
<a name="ST_IsRing-function-arguments"></a>

 *geom*   
A value of data type `GEOMETRY` or an expression that evaluates to a `GEOMETRY` type. The geometry must be a `LINESTRING`.

## Return type
<a name="ST_IsRing-function-return"></a>

`BOOLEAN`

If *geom* is not a `LINESTRING`, then an error is returned. 

## Examples
<a name="ST_IsRing-function-examples"></a>

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
```