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

# 52.29. pg\_language \#

### 52.29. `pg_language` [#](#catalog-pg-language) <a href="#catalog-pg-language" id="catalog-pg-language"></a>

目錄 `pg_language` 登錄可用來撰寫函式或預存程序的語言。關於語言處理常式的更多資訊，請參閱 [CREATE LANGUAGE](https://docs.postgresql.tw/19/reference/sql-commands/sql-createlanguage.md) 與[第 40 章](https://docs.postgresql.tw/19/server-programming/xplang.md)。

#### 表 52.29. `pg_language` 欄位 [#](#catalog-pg-language-columns) <a href="#catalog-pg-language-columns" id="catalog-pg-language-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>資料列識別碼</p>                                                                                                                                                                                                                                                         |
| <p><code>lanname</code> <code>name</code></p><p>語言的名稱</p>                                                                                                                                                                                                                                                     |
| <p><code>lanowner</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>lanispl</code> <code>bool</code></p><p>內部語言（例如 SQL）此值為 false，使用者自訂的語言則為 true。目前 pg\_dump 仍使用此欄位來判斷哪些語言需要傾印，但未來可能會改由其他機制取代。</p>                                                                                                                                                                       |
| <p><code>lanpltrusted</code> <code>bool</code></p><p>若這是受信任的語言則為 true，這表示一般認為它不會授予對正常 SQL 執行環境以外任何事物的存取權。只有超級使用者可以用不受信任的語言建立函式。</p>                                                                                                                                                                           |
| <p><code>lanplcallfoid</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>laninline</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>此欄位參照一個函式，負責執行“行內”匿名程式碼區塊（<a href="https://docs.postgresql.tw/19/reference/sql-commands/sql-do.md">DO</a> 區塊）。若不支援行內區塊則為零。</p> |
| <p><code>lanvalidator</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>lanacl</code> <code>aclitem\[]</code></p><p>存取權限；詳細資訊請參閱<a href="https://docs.postgresql.tw/19/the-sql-language/ddl/ddl-priv.md">第 5.8 節</a></p>                                                                                                                                                     |

<br>

***

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