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

# 52.21. pg\_event\_trigger \#

### 52.21. `pg_event_trigger` [#](#catalog-pg-event-trigger) <a href="#catalog-pg-event-trigger" id="catalog-pg-event-trigger"></a>

系統目錄 `pg_event_trigger` 存放事件觸發程序。更多資訊請參閱[第 38 章](https://docs.postgresql.tw/19/server-programming/event-triggers.md)。

#### 表 52.21. `pg_event_trigger` 欄位 [#](#catalog-pg-event-trigger-columns) <a href="#catalog-pg-event-trigger-columns" id="catalog-pg-event-trigger-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>資料列識別碼</p>                                                                                                                                                                                                                                                                                                                               |
| <p><code>evtname</code> <code>name</code></p><p>觸發程序名稱（必須唯一）</p>                                                                                                                                                                                                                                                                                                                    |
| <p><code>evtevent</code> <code>name</code></p><p>識別此觸發程序會在哪個事件發生時觸發</p>                                                                                                                                                                                                                                                                                                             |
| <p><code>evtowner</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>evtfoid</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>evtenabled</code> <code>char</code></p><p>控制事件觸發程序在哪些 <a href="https://docs.postgresql.tw/19/server-administration/runtime-config/runtime-config-client.md#GUC-SESSION-REPLICATION-ROLE">session\_replication\_role</a> 模式下觸發。 <code>O</code> = 觸發程序在“origin”與“local”模式下觸發， <code>D</code> = 觸發程序已停用， <code>R</code> = 觸發程序在“replica”模式下觸發， <code>A</code> = 觸發程序一律觸發。</p> |
| <p><code>evttags</code> <code>text\[]</code></p><p>會使此觸發程序觸發的命令標籤。若為 NULL，則此觸發程序的觸發不會依命令標籤加以限制。</p>                                                                                                                                                                                                                                                                                 |

<br>

***

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