# 36.37. role\_table\_grants

檢視表 role\_table\_grants 列出會授權者或被授權者為目前查詢的角色的資料表或檢視表所關連的所有權限。更多資訊可以參考在 table\_privileges 裡。此檢視表與 table\_privileges 之間唯一有效的區別是，此檢視表不包含了透過授權給 PUBLIC 的方式使目前角度有權存取的資料表。

#### **Table 36.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/13/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.
