

 从补丁 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/)。

# CURRENT\$1SCHEMAS
<a name="r_CURRENT_SCHEMAS"></a>

返回当前搜索路径中任何 schemas 的名称的数组。当前搜索路径是在 search\$1path 参数中定义的。

## 语法
<a name="r_CURRENT_SCHEMAS-synopsis"></a>

**注意**  
这是领导节点函数。如果此函数引用了用户创建的表、STL/STV 系统表或 SVV/SVL 系统视图，它将返回错误。

```
current_schemas(include_implicit)
```

## 参数
<a name="r_CURRENT_SCHEMAS-argument"></a>

 *include\$1implicit*   
如果为 True，则指定搜索路径应包含任何隐式包含的系统 schemas。有效值为 `true` 和 `false`。通常，如果为 `true`，此参数将返回 `pg_catalog` schema 以及当前 schema。

## 返回类型
<a name="r_CURRENT_SCHEMAS-return-type"></a>

返回 CHAR 或 VARCHAR 字符串。

## 示例
<a name="r_CURRENT_SCHEMAS-examples"></a>

以下示例返回当前搜索路径中的 schemas（不包括隐式包含的系统 schemas）的名称：

```
select current_schemas(false);

current_schemas
-----------------
{public}
(1 row)
```

以下示例返回当前搜索路径中的 schemas（包括隐式包含的系统 schemas）的名称：

```
select current_schemas(true);

current_schemas
---------------------
{pg_catalog,public}
(1 row)
```