# 37.37. role\_table\_grants

檢視表 role\_table\_grants 用於列出目前連線角色是授權者或被授權者，其資料表或檢視表上所被授予的權限。更多資訊可以在 table\_privileges 下找到。此檢視表與 table\_privileges 檢視表之間的唯一差別是，此檢視表省略了透過 PUBLIC 授權的方式使其可以存取的資料表。

#### **Table 37.35. `role_table_grants` 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/role_table_grants.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.
