

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 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*   
`GEOMETRY` 資料類型的 `POINT` 值。

## 傳回類型
<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 會傳回 3DZ 幾何中點的 `z` 座標。

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

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

以下 SQL 會傳回 4D 幾何中點的 `z` 座標。

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

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