

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 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/)。

# STL\$1ERROR
<a name="r_STL_ERROR"></a>

记录由 Amazon Redshift 数据库引擎生成的内部处理错误。STL\$1ERROR 不记录 SQL 错误或消息。STL\$1ERROR 中的信息对排除某些错误非常有用。AWS Support 工程师可能要求您提供此信息来作为故障排除过程的一部分。

STL\$1ERROR 对所有用户可见。超级用户可以查看所有行；普通用户只能查看其自己的数据。有关更多信息，请参阅 [系统表和视图中的数据可见性](cm_chap_system-tables.md#c_visibility-of-data)。

此表中的部分或全部数据也可以在 SYS 监控视图 [SYS\$1QUERY\$1HISTORY](SYS_QUERY_HISTORY.md) 中找到。SYS 监控视图中的数据经过格式化处理，便于使用和理解。我们建议您使用 SYS 监控视图进行查询。

有关在使用 Copy 命令加载数据时可生成的错误代码的列表，请参阅[加载错误参考](r_Load_Error_Reference.md)。

## 表列
<a name="r_STL_ERROR-table-columns"></a>

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/dg/r_STL_ERROR.html)

## 示例查询
<a name="r_STL_ERROR-sample-queries"></a>

以下示例检索了 STL\$1ERROR 中的错误信息。

```
select process, errcode, linenum as line,
trim(error) as err
from stl_error;

   process    | errcode | line |                               err
--------------+---------+------+------------------------------------------------------------------
 padbmaster   |    8001 |  194 | Path prefix: s3://redshift-downloads/testnulls/venue.txt*
 padbmaster   |    8001 |  529 | Listing bucket=redshift-downloads prefix=tests/category-csv-quotes
 padbmaster   |       2 |  190 | database "template0" is not currently accepting connections
 padbmaster   |      32 | 1956 | pq_flush: could not send data to client: Broken pipe
(4 rows)
```