Home Explore Blog CI



postgresql

81th chunk of `doc/src/sgml/information_schema.sgml`
33091272defa34d1e151eefec3431fb6dbd11ab4ea09b1950000000100000fa5
 the trigger (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>trigger_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the trigger
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>trigger_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the trigger
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_object_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the table that the trigger
       is defined on (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_object_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the table that the trigger is defined on
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_object_table</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the table that the trigger is defined on
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_object_column</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the column that the trigger is defined on
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-triggers">
  <title><literal>triggers</literal></title>

  <para>
   The view <literal>triggers</literal> contains all triggers defined
   in the current database on tables and views that the current user owns
   or has some privilege other than <literal>SELECT</literal> on.
  </para>

  <table>
   <title><structname>triggers</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>trigger_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the trigger (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>trigger_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the trigger
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>trigger_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the trigger
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_manipulation</structfield> <type>character_data</type>
      </para>
      <para>
       Event that fires the trigger (<literal>INSERT</literal>,
       <literal>UPDATE</literal>, or <literal>DELETE</literal>)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>event_object_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the table that the trigger
       is defined on (always the current database)
      </para></entry>

Title: Information Schema: Triggers
Summary
This section describes two views in the information schema: triggered_update_columns and triggers. The triggered_update_columns view identifies columns for triggers that specify a column list, while the triggers view contains all triggers defined in the current database on tables and views that the current user owns or has some privilege on, including columns for the trigger name, event manipulation, and event object details.