

 Amazon Redshift は、パッチ 198 以降、新しい Python UDF の作成をサポートしなくなります。既存の Python UDF は、2026 年 6 月 30 日まで引き続き機能します。詳細については、[ブログ記事](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)を参照してください。

# ST\$1Z
<a name="ST_Z-function"></a>

ST\$1Z は、入力ポイントの `z` 座標を返します。

## 構文
<a name="ST_Z-function-syntax"></a>

```
ST_Z(point)
```

## 引数
<a name="ST_Z-function-arguments"></a>

 *point*   
データ型 `POINT` の `GEOMETRY` 値。

## 戻り型
<a name="ST_Z-function-return"></a>

`m` 座標系の `DOUBLE PRECISION` 値。

*point* が null の場合、null が返されます。

*point* が 2D または 3DM のポイントの場合、null が返されます。

*point* が空のポイントの場合、null が返されます。

*point* が `POINT` でない場合、エラーが返されます。

## 例
<a name="ST_Z-function-examples"></a>

次の SQL は、1 つのポイントの `z` 座標を、3DZ ジオメトリで返します。

```
SELECT ST_Z(ST_GeomFromEWKT('POINT Z (1 2 3)'));
```

```
st_z
-----------
 3
```

次の SQL は、1 つのポイントの `z` 座標を、4D ジオメトリで返します。

```
SELECT ST_Z(ST_GeomFromEWKT('POINT ZM (1 2 3 4)'));
```

```
st_z
-----------
 3
```