# 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> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/client-interfaces/the-information-schema/36.51.-table_privileges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
