> 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-foreign-data-wrapper.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 52.23. pg\_foreign\_data\_wrapper \#

### 52.23. `pg_foreign_data_wrapper` [#](#catalog-pg-foreign-data-wrapper) <a href="#catalog-pg-foreign-data-wrapper" id="catalog-pg-foreign-data-wrapper"></a>

目錄 `pg_foreign_data_wrapper` 存放外部資料包裝器定義。外部資料包裝器是用來存取位於外部伺服器上之外部資料的機制。

#### 表 52.23. `pg_foreign_data_wrapper` 欄位 [#](#catalog-pg-foreign-data-wrapper-columns) <a href="#catalog-pg-foreign-data-wrapper-columns" id="catalog-pg-foreign-data-wrapper-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>資料列識別碼</p>                                                                                                                                                                                                         |
| <p><code>fdwname</code> <code>name</code></p><p>外部資料包裝器的名稱</p>                                                                                                                                                                                                |
| <p><code>fdwowner</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>外部資料包裝器的擁有者</p>                                                             |
| <p><code>fdwhandler</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-proc.md"><code>pg\_proc</code></a>.<code>oid</code>）</p><p>參照一個處理函式，負責為此外部資料包裝器提供執行常式。若未提供處理函式則為零</p>                                    |
| <p><code>fdwvalidator</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-proc.md"><code>pg\_proc</code></a>.<code>oid</code>）</p><p>參照一個驗證函式，負責檢查提供給此外部資料包裝器之選項的有效性，以及使用此外部資料包裝器之外部伺服器與使用者對應的選項。若未提供驗證函式則為零</p> |
| <p><code>fdwacl</code> <code>aclitem\[]</code></p><p>存取權限；詳細資訊請參閱<a href="https://docs.postgresql.tw/19/the-sql-language/ddl/ddl-priv.md">第 5.8 節</a></p>                                                                                                     |
| <p><code>fdwoptions</code> <code>text\[]</code></p><p>外部資料包裝器專屬的選項，以 “keyword=value” 字串形式呈現</p>                                                                                                                                                               |

<br>

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/catalog-pg-foreign-data-wrapper.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-foreign-data-wrapper.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.
