triggers on tables
and views.
See <xref linkend="sql-createtrigger"/>
for more information.
</para>
<table>
<title><structname>pg_trigger</structname> Columns</title>
<tgroup cols="1">
<thead>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
Column Type
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>oid</structfield> <type>oid</type>
</para>
<para>
Row identifier
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgrelid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The table this trigger is on
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgparentid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-trigger"><structname>pg_trigger</structname></link>.<structfield>oid</structfield>)
</para>
<para>
Parent trigger that this trigger is cloned from (this happens when
partitions are created or attached to a partitioned table);
zero if not a clone
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgname</structfield> <type>name</type>
</para>
<para>
Trigger name (must be unique among triggers of same table)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgfoid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The function to be called
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgtype</structfield> <type>int2</type>
</para>
<para>
Bit mask identifying trigger firing conditions
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgenabled</structfield> <type>char</type>
</para>
<para>
Controls in which <xref linkend="guc-session-replication-role"/> modes
the trigger fires.
<literal>O</literal> = trigger fires in <quote>origin</quote> and <quote>local</quote> modes,
<literal>D</literal> = trigger is disabled,
<literal>R</literal> = trigger fires in <quote>replica</quote> mode,
<literal>A</literal> = trigger fires always.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgisinternal</structfield> <type>bool</type>
</para>
<para>
True if trigger is internally generated (usually, to enforce
the constraint identified by <structfield>tgconstraint</structfield>)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgconstrrelid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The table referenced by a referential integrity constraint
(zero if trigger is not for a referential integrity constraint)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>tgconstrindid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)