Home Explore Blog CI



postgresql

83th chunk of `doc/src/sgml/information_schema.sgml`
68fda81339a66e09766e0e64872a357c3b5e76ca41e81a8d0000000100000fa0
 <structfield>action_orientation</structfield> <type>character_data</type>
      </para>
      <para>
       Identifies whether the trigger fires once for each processed
       row or once for each statement (<literal>ROW</literal> or
       <literal>STATEMENT</literal>)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>action_timing</structfield> <type>character_data</type>
      </para>
      <para>
       Time at which the trigger fires (<literal>BEFORE</literal>,
       <literal>AFTER</literal>, or <literal>INSTEAD OF</literal>)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>action_reference_old_table</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the <quote>old</quote> transition table, or null if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>action_reference_new_table</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the <quote>new</quote> transition table, or null if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>action_reference_old_row</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Applies to a feature not available in <productname>PostgreSQL</productname>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>action_reference_new_row</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Applies to a feature not available in <productname>PostgreSQL</productname>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>created</structfield> <type>time_stamp</type>
      </para>
      <para>
       Applies to a feature not available in <productname>PostgreSQL</productname>
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   Triggers in <productname>PostgreSQL</productname> have two
   incompatibilities with the SQL standard that affect the
   representation in the information schema.  First, trigger names are
   local to each table in <productname>PostgreSQL</productname>, rather
   than being independent schema objects.  Therefore there can be duplicate
   trigger names defined in one schema, so long as they belong to
   different tables.  (<literal>trigger_catalog</literal> and
   <literal>trigger_schema</literal> are really the values pertaining
   to the table that the trigger is defined on.)  Second, triggers can
   be defined to fire on multiple events in
   <productname>PostgreSQL</productname> (e.g., <literal>ON INSERT OR
   UPDATE</literal>), whereas the SQL standard only allows one.  If a
   trigger is defined to fire on multiple events, it is represented as
   multiple rows in the information schema, one for each type of
   event.  As a consequence of these two issues, the primary key of
   the view <literal>triggers</literal> is really
   <literal>(trigger_catalog, trigger_schema, event_object_table,
   trigger_name, event_manipulation)</literal> instead of
   <literal>(trigger_catalog, trigger_schema, trigger_name)</literal>,
   which is what the SQL standard specifies.  Nonetheless, if you
   define your triggers in a manner that conforms with the SQL
   standard (trigger names unique in the schema and only one event
   type per trigger), this will not affect you.
  </para>

  <note>
   <para>
    Prior to <productname>PostgreSQL</productname> 9.1, this view's columns
    <structfield>action_timing</structfield>,
    <structfield>action_reference_old_table</structfield>,
    <structfield>action_reference_new_table</structfield>,

Title: Triggers View Incompatibilities and Columns
Summary
This section describes the remaining columns in the triggers view, including action orientation, timing, and reference tables, as well as incompatibilities between PostgreSQL and the SQL standard, such as trigger names being local to each table and triggers firing on multiple events.