# 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/internals/system-catalogs/pg_event_trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
