Home Explore Blog CI



postgresql

46th chunk of `doc/src/sgml/catalogs.sgml`
1e9977ef59462c7ff865ff98c41c6de97bc4e9df54f3a1330000000100000fa0
 </para>
      <para>
       Arbitrary text that serves as the description of this object
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>


 <sect1 id="catalog-pg-enum">
  <title><structname>pg_enum</structname></title>

  <indexterm zone="catalog-pg-enum">
   <primary>pg_enum</primary>
  </indexterm>

  <para>
   The <structname>pg_enum</structname> catalog contains entries
   showing the values and labels for each enum type. The
   internal representation of a given enum value is actually the OID
   of its associated row in <structname>pg_enum</structname>.
  </para>

  <table>
   <title><structname>pg_enum</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>enumtypid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the <link linkend="catalog-pg-type"><structname>pg_type</structname></link> entry owning this enum value
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>enumsortorder</structfield> <type>float4</type>
      </para>
      <para>
       The sort position of this enum value within its enum type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>enumlabel</structfield> <type>name</type>
      </para>
      <para>
       The textual label for this enum value
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   The OIDs for <structname>pg_enum</structname> rows follow a special
   rule: even-numbered OIDs are guaranteed to be ordered in the same way
   as the sort ordering of their enum type.  That is, if two even OIDs
   belong to the same enum type, the smaller OID must have the smaller
   <structfield>enumsortorder</structfield> value.  Odd-numbered OID values
   need bear no relationship to the sort order.  This rule allows the
   enum comparison routines to avoid catalog lookups in many common cases.
   The routines that create and alter enum types attempt to assign even
   OIDs to enum values whenever possible.
  </para>

  <para>
   When an enum type is created, its members are assigned sort-order
   positions 1..<replaceable>n</replaceable>.  But members added later might be given
   negative or fractional values of <structfield>enumsortorder</structfield>.
   The only requirement on these values is that they be correctly
   ordered and unique within each enum type.
  </para>
 </sect1>


 <sect1 id="catalog-pg-event-trigger">
  <title><structname>pg_event_trigger</structname></title>

  <indexterm zone="catalog-pg-event-trigger">
   <primary>pg_event_trigger</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_event_trigger</structname> stores event triggers.
   See <xref linkend="event-triggers"/> for more information.
  </para>

  <table>
   <title><structname>pg_event_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>
   

Title: pg_enum Catalog Details and pg_event_trigger Catalog
Summary
This section provides further details on the pg_enum catalog, including its columns: oid, enumtypid, enumsortorder, and enumlabel. It explains the special rule for pg_enum row OIDs: even-numbered OIDs are ordered according to the sort ordering of their enum type. It also describes the pg_event_trigger catalog, which stores event triggers.