

 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/)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# SVV\_RLS\_RELATION
<a name="r_SVV_RLS_RELATION"></a>

使用 SVV\_RLS\_RELATION 來檢視受到 RLS 保護的所有關係的清單。

所有使用者都可看見 SVV\_RLS\_RELATION。超級使用者可以看見所有資料列；一般使用者只能看見自己的資料。如需詳細資訊，請參閱[系統資料表和檢視中資料的可見性](cm_chap_system-tables.md#c_visibility-of-data)。

## 資料表欄
<a name="r_SVV_RLS_RELATION-table-columns"></a>


| 欄名稱  | 資料類型  | 說明 | 
| --- | --- | --- | 
| datname | text | 包含關聯的資料庫名稱。 | 
| relschema | text | 包含關係之結構描述的名稱。 | 
| relname | text | 關係的名稱。 | 
| relkind | text | 關係的類型，例如資料表或檢視。 | 
| is\_rls\_on | boolean | 參數，指出關係是否受到 RS 保護。 | 
| is\_rls\_datashare\_on | boolean | 此參數指出關係是否透過資料共用受 RLS 保護。 | 
| rls\_conjunction\_type | character(3) | 指出關係是否與 and 或 or 結合 RLS 政策的參數。 | 
| rls\_datashare\_conjunction\_type | character(3) | 指出關係是否透過資料共用與 and 或 or 結合 RLS 政策的參數。 | 

## 範例查詢
<a name="r_SVV_RLS_RELATION-sample-query"></a>

下列範例顯示 SVV\_RLS\_RELATION 的結果。

```
ALTER TABLE tickit_category_redshift ROW LEVEL SECURITY ON FOR DATASHARES;       

            
--Inspect RLS state on the relations using SVV_RLS_RELATION.
SELECT datname, relschema, relname, relkind, is_rls_on, is_rls_datashare_on FROM svv_rls_relation ORDER BY relname;

  datname  | relschema |        relname           | relkind | is_rls_on | is_rls_datashare_on | rls_conjunction_type | rls_datashare_conjunction_type
-----------+-----------+--------------------------+---------+-----------+---------------------+----------------------+--------------------------------
 tickit_db |   public  | tickit_category_redshift |  table  |      t    |           t         |          and         |              and
(1 row)
```