

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://www.amazonaws.cn/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# SVV\$1REDSHIFT\$1COLUMNS
<a name="r_SVV_REDSHIFT_COLUMNS"></a>

使用 SVV\$1REDSHIFT\$1COLUMNS 可以查看用户有权访问的所有列的列表。这组列包括集群上的列和远程集群提供的数据共享中的列。

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

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

[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/redshift/latest/dg/r_SVV_REDSHIFT_COLUMNS.html)

## 示例查询
<a name="r_SVV_REDSHIFT_COLUMNS-sample-query"></a>

下面的示例返回 SVV\$1REDSHIFT\$1COLUMNS 的输出。

```
SELECT *
FROM svv_redshift_columns
WHERE database_name = 'tickit_db'
    AND TABLE_NAME = 'tickit_sales_redshift'
ORDER BY COLUMN_NAME,
    TABLE_NAME,
    database_name
LIMIT 5;

database_name | schema_name |       table_name      | column_name | ordinal_position | data_type | column_default | is_nullable | encoding | distkey | sortkey | column_acl  | remarks
--------------+-------------+-----------------------+-------------+------------------+-----------+----------------+-------------+----------+---------+---------+-------------+--------
   tickit_db  |   public    | tickit_sales_redshift |   buyerid   |        4         |  integer  |                |      NO     |   az64   |  False  |    0    |             |
   tickit_db  |   public    | tickit_sales_redshift |  commission |        9         |  numeric  |      (8,2)     |     YES     |   az64   |  False  |    0    |             |
   tickit_db  |   public    | tickit_sales_redshift |    dateid   |        6         |  smallint |                |      NO     |   none   |  False  |    1    |             |
   tickit_db  |   public    | tickit_sales_redshift |   eventid   |        5         |  integer  |                |      NO     |   az64   |  False  |    0    |	      |
   tickit_db  |   public    | tickit_sales_redshift |   listid    |        2         |  integer  |                |      NO     |   az64   |  True   |    0    |             |
```