Home Explore Blog CI



postgresql

99th chunk of `doc/src/sgml/catalogs.sgml`
6c1b6629834e400bd8af442bd319ce0c4aaaf49c19f73e640000000100000fa8
 <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>)
      </para>
      <para>
       The index supporting a unique, primary key, referential integrity,
       or exclusion constraint
       (zero if trigger is not for one of these types of constraint)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgconstraint</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The <link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link> entry associated with the trigger
       (zero if trigger is not for a constraint)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgdeferrable</structfield> <type>bool</type>
      </para>
      <para>
       True if constraint trigger is deferrable
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tginitdeferred</structfield> <type>bool</type>
      </para>
      <para>
       True if constraint trigger is initially deferred
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgnargs</structfield> <type>int2</type>
      </para>
      <para>
       Number of argument strings passed to trigger function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgattr</structfield> <type>int2vector</type>
       (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attnum</structfield>)
      </para>
      <para>
       Column numbers, if trigger is column-specific; otherwise an
       empty array
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgargs</structfield> <type>bytea</type>
      </para>
      <para>
       Argument strings to pass to trigger, each NULL-terminated
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgqual</structfield> <type>pg_node_tree</type>
      </para>
      <para>
       Expression tree (in <function>nodeToString()</function>
       representation) for the trigger's <literal>WHEN</literal> condition, or null
       if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tgoldtable</structfield> <type>name</type>
      </para>
      <para>
       <literal>REFERENCING</literal> clause name for <literal>OLD TABLE</literal>,
       or null if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para

Title: pg_trigger Catalog Columns (Continued)
Summary
This section continues describing the columns of the `pg_trigger` catalog. It details columns related to constraints: `tgconstrrelid` (table referenced by referential integrity constraint), `tgconstrindid` (index supporting constraint), `tgconstraint` (associated pg_constraint entry), `tgdeferrable` (if constraint is deferrable), `tginitdeferred` (if constraint is initially deferred). It also covers trigger function arguments: `tgnargs` (number of arguments), `tgattr` (column numbers), `tgargs` (argument strings). Finally, it covers trigger conditions and referencing clauses: `tgqual` (WHEN condition expression), and `tgoldtable` (REFERENCING OLD TABLE clause name).