blob: 3074e4662ce345ec17bcb5b2c19d35ed29dad3c5 [file]
---
title: pg_trigger
---
The `pg_trigger` system catalog table stores triggers on tables.
**Note:** HAWQ does not support triggers.
<a id="topic1__hy183441"></a>
<span class="tablecap">Table 1. pg\_catalog.pg\_trigger</span>
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<thead>
<tr class="header">
<th>column</th>
<th>type</th>
<th>references</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code class="ph codeph">tgrelid</code></td>
<td>oid</td>
<td><em>pg_class.oid</em>
<p>Note that HAWQ does not enforce referential integrity.</p></td>
<td>The table this trigger is on.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tgname</code></td>
<td>name</td>
<td> </td>
<td>Trigger name (must be unique among triggers of same table).</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgfoid</code></td>
<td>oid</td>
<td><em>pg_proc.oid</em>
<p>Note that HAWQ does not enforce referential integrity.</p></td>
<td>The function to be called.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tgtype</code></td>
<td>smallint</td>
<td> </td>
<td>Bit mask identifying trigger conditions.</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgenabled</code></td>
<td>boolean</td>
<td> </td>
<td>True if trigger is enabled.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tgisconstraint</code></td>
<td>boolean</td>
<td> </td>
<td>True if trigger implements a referential integrity constraint.</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgconstrname</code></td>
<td>name</td>
<td> </td>
<td>Referential integrity constraint name.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tgconstrrelid</code></td>
<td>oid</td>
<td><em>pg_class.oid</em>
<p>Note that HAWQ does not enforce referential integrity.</p></td>
<td>The table referenced by an referential integrity constraint.</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgdeferrable</code></td>
<td>boolean</td>
<td> </td>
<td>True if deferrable.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tginitdeferred</code></td>
<td>boolean</td>
<td> </td>
<td>True if initially deferred.</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgnargs</code></td>
<td>smallint</td>
<td> </td>
<td>Number of argument strings passed to trigger function.</td>
</tr>
<tr class="even">
<td><code class="ph codeph">tgattr</code></td>
<td>int2vector</td>
<td> </td>
<td>Currently not used.</td>
</tr>
<tr class="odd">
<td><code class="ph codeph">tgargs</code></td>
<td>bytea</td>
<td> </td>
<td>Argument strings to pass to trigger, each NULL-terminated.</td>
</tr>
</tbody>
</table>