> 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/internals/system-catalogs/pg_event_trigger.md).

# 51.21. pg\_event\_trigger

The catalog `pg_event_trigger` stores event triggers. See [Chapter 39](https://www.postgresql.org/docs/13/event-triggers.html) for more information.

#### **Table 51.21. `pg_event_trigger` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>oid</code> <code>oid</code></p><p>Row identifier</p>                                                                                                                                                                                                                                                                                                                                                                            |
| <p><code>evtname</code> <code>name</code></p><p>Trigger name (must be unique)</p>                                                                                                                                                                                                                                                                                                                                                        |
| <p><code>evtevent</code> <code>name</code></p><p>Identifies the event for which this trigger fires</p>                                                                                                                                                                                                                                                                                                                                   |
| <p><code>evtowner</code> <code>oid</code> (references <a href="https://www.postgresql.org/docs/13/catalog-pg-authid.html"><code>pg\_authid</code></a>.<code>oid</code>)</p><p>Owner of the event trigger</p>                                                                                                                                                                                                                             |
| <p><code>evtfoid</code> <code>oid</code> (references <a href="https://www.postgresql.org/docs/13/catalog-pg-proc.html"><code>pg\_proc</code></a>.<code>oid</code>)</p><p>The function to be called</p>                                                                                                                                                                                                                                   |
| <p><code>evtenabled</code> <code>char</code></p><p>Controls in which <a href="https://www.postgresql.org/docs/13/runtime-config-client.html#GUC-SESSION-REPLICATION-ROLE">session\_replication\_role</a> modes the event trigger fires. <code>O</code> = trigger fires in “origin” and “local” modes, <code>D</code> = trigger is disabled, <code>R</code> = trigger fires in “replica” mode, <code>A</code> = trigger fires always.</p> |
| <p><code>evttags</code> <code>text\[]</code></p><p>Command tags for which this trigger will fire. If NULL, the firing of this trigger is not restricted on the basis of the command tag.</p>                                                                                                                                                                                                                                             |


---

# 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/internals/system-catalogs/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.
