Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/catalogs.sgml`
64aefb62a1691e0a64e53fe82fc8c13773b8acccd362f2ed0000000100000fa7
 linkend="catalog-pg-transform"><structname>pg_transform</structname></link></entry>
      <entry>transforms (data type to procedural language conversions)</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-trigger"><structname>pg_trigger</structname></link></entry>
      <entry>triggers</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-ts-config"><structname>pg_ts_config</structname></link></entry>
      <entry>text search configurations</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-ts-config-map"><structname>pg_ts_config_map</structname></link></entry>
      <entry>text search configurations' token mappings</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-ts-dict"><structname>pg_ts_dict</structname></link></entry>
      <entry>text search dictionaries</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-ts-parser"><structname>pg_ts_parser</structname></link></entry>
      <entry>text search parsers</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-ts-template"><structname>pg_ts_template</structname></link></entry>
      <entry>text search templates</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-type"><structname>pg_type</structname></link></entry>
      <entry>data types</entry>
     </row>

     <row>
      <entry><link linkend="catalog-pg-user-mapping"><structname>pg_user_mapping</structname></link></entry>
      <entry>mappings of users to foreign servers</entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>


 <sect1 id="catalog-pg-aggregate">
  <title><structname>pg_aggregate</structname></title>

  <indexterm zone="catalog-pg-aggregate">
   <primary>pg_aggregate</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_aggregate</structname> stores information about
   aggregate functions.  An aggregate function is a function that
   operates on a set of values (typically one column from each row
   that matches a query condition) and returns a single value computed
   from all these values.  Typical aggregate functions are
   <function>sum</function>, <function>count</function>, and
   <function>max</function>.  Each entry in
   <structname>pg_aggregate</structname> is an extension of an entry
   in <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.
   The <structname>pg_proc</structname> entry carries the aggregate's name,
   input and output data types, and other information that is similar to
   ordinary functions.
  </para>

  <table>
   <title><structname>pg_aggregate</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>aggfnoid</structfield> <type>regproc</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       <structname>pg_proc</structname> OID of the aggregate function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>aggkind</structfield> <type>char</type>
      </para>
      <para>
       Aggregate kind:
       <literal>n</literal> for <quote>normal</quote> aggregates,
       <literal>o</literal> for <quote>ordered-set</quote> aggregates, or
       <literal>h</literal> for <quote>hypothetical-set</quote> aggregates
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>aggnumdirectargs</structfield> <type>int2</type>
      </para>
      <para>
       Number of direct (non-aggregated) arguments of an ordered-set or
       hypothetical-set

Title: System Catalogs List (Continued) and pg_aggregate Catalog Details
Summary
This section continues the list of PostgreSQL system catalogs, covering pg_transform (data type conversions), pg_trigger (triggers), pg_ts_config (text search configurations), pg_ts_config_map (text search token mappings), pg_ts_dict (text search dictionaries), pg_ts_parser (text search parsers), pg_ts_template (text search templates), pg_type (data types), and pg_user_mapping (user to foreign server mappings). It then goes into detail on the pg_aggregate catalog, which stores information about aggregate functions. It explains that aggregate functions operate on a set of values to return a single value. It also lists the columns of the pg_aggregate catalog, including aggfnoid, aggkind, and aggnumdirectargs.