# 36.49. table\_privileges

檢視圖 table\_privileges 列出在資料表或檢視表上授權目前查詢的角色相關的所有權限。資料表、授權者和被授權者的每個組合形成一筆資料。

#### **Table 36.47. `table_privileges` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>grantor</code> <code>sql\_identifier</code></p><p>Name of the role that granted the privilege</p>                                                                                                                                                                                                                                                                                        |
| <p><code>grantee</code> <code>sql\_identifier</code></p><p>Name of the role that the privilege was granted to</p>                                                                                                                                                                                                                                                                                 |
| <p><code>table\_catalog</code> <code>sql\_identifier</code></p><p>Name of the database that contains the table (always the current database)</p>                                                                                                                                                                                                                                                  |
| <p><code>table\_schema</code> <code>sql\_identifier</code></p><p>Name of the schema that contains the table</p>                                                                                                                                                                                                                                                                                   |
| <p><code>table\_name</code> <code>sql\_identifier</code></p><p>Name of the table</p>                                                                                                                                                                                                                                                                                                              |
| <p><code>privilege\_type</code> <code>character\_data</code></p><p>Type of the privilege: <code>SELECT</code>, <code>INSERT</code>, <code>UPDATE</code>, <code>DELETE</code>, <code>TRUNCATE</code>, <code>REFERENCES</code>, or <code>TRIGGER</code></p>                                                                                                                                         |
| <p><code>is\_grantable</code> <code>yes\_or\_no</code></p><p><code>YES</code> if the privilege is grantable, <code>NO</code> if not</p>                                                                                                                                                                                                                                                           |
| <p><code>with\_hierarchy</code> <code>yes\_or\_no</code></p><p>In the SQL standard, <code>WITH HIERARCHY OPTION</code> is a separate (sub-)privilege allowing certain operations on table inheritance hierarchies. In PostgreSQL, this is included in the <code>SELECT</code> privilege, so this column shows <code>YES</code> if the privilege is <code>SELECT</code>, else <code>NO</code>.</p> |
