> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-default-acl.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 52.17. pg\_default\_acl \#

### 52.17. `pg_default_acl` [#](#catalog-pg-default-acl) <a href="#catalog-pg-default-acl" id="catalog-pg-default-acl"></a>

系統目錄 `pg_default_acl` 存放要指派給新建立物件的初始權限。

#### 表 52.17. `pg_default_acl` 欄位 [#](#catalog-pg-default-acl-columns) <a href="#catalog-pg-default-acl-columns" id="catalog-pg-default-acl-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>資料列識別碼</p>                                                                                                                                                                      |
| <p><code>defaclrole</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md"><code>pg\_authid</code></a>.<code>oid</code>）</p><p>與此項目相關聯之角色的 OID</p>                    |
| <p><code>defaclnamespace</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-namespace.md"><code>pg\_namespace</code></a>.<code>oid</code>）</p><p>與此項目相關聯之命名空間的 OID；若無則為零</p> |
| <p><code>defaclobjtype</code> <code>char</code></p><p>此項目所適用的物件類型： <code>r</code> = 關聯（資料表、檢視表）， <code>S</code> = 序列， <code>f</code> = 函式， <code>T</code> = 型別， <code>n</code> = 綱要， <code>L</code> = 大型物件</p>             |
| <p><code>defaclacl</code> <code>aclitem\[]</code></p><p>此類物件在建立時應具有的存取權限</p>                                                                                                                                               |

<br>

`pg_default_acl` 項目顯示要指派給屬於指定使用者之物件的初始權限。目前有兩種項目：`defaclnamespace` = 零的「全域」項目，以及參照特定綱要的「個別綱要」項目。若存在全域項目，它會*覆寫*該物件類型一般寫死的預設權限。個別綱要項目若存在，則代表要*加入*全域或寫死之預設權限的權限。

請注意，當另一個系統目錄中的 ACL 項目為 null 時，它會被視為代表其物件寫死的預設權限，*而不是* `pg_default_acl` 當下可能存放的任何內容。`pg_default_acl` 只會在物件建立期間被查閱。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/catalog-pg-default-acl.html)（原文版本：18.6；核對日期：2026-10-17）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-default-acl.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
