Home Explore Blog CI



postgresql

9th chunk of `doc/src/sgml/catalogs.sgml`
be11b03f166cfcf84cdbfad37b8ae07056b10d1d0899b7310000000100000fa7
 information about
   writing aggregate functions and the meaning of the transition
   functions, etc.
  </para>

 </sect1>


 <sect1 id="catalog-pg-am">
  <title><structname>pg_am</structname></title>

  <indexterm zone="catalog-pg-am">
   <primary>pg_am</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_am</structname> stores information about
   relation access methods.  There is one row for each access method supported
   by the system.
   Currently, only tables and indexes have access methods. The requirements for table
   and index access methods are discussed in detail in <xref linkend="tableam"/> and
   <xref linkend="indexam"/> respectively.
  </para>

  <table>
   <title><structname>pg_am</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>amname</structfield> <type>name</type>
      </para>
      <para>
       Name of the access method
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>amhandler</structfield> <type>regproc</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of a handler function that is responsible for supplying information
       about the access method
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>amtype</structfield> <type>char</type>
      </para>
      <para>
       <literal>t</literal> = table (including materialized views),
       <literal>i</literal> = index.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <note>
   <para>
    Before <productname>PostgreSQL</productname> 9.6, <structname>pg_am</structname>
    contained many additional columns representing properties of index access
    methods.  That data is now only directly visible at the C code level.
    However, <function>pg_index_column_has_property()</function> and related
    functions have been added to allow SQL queries to inspect index access
    method properties; see <xref linkend="functions-info-catalog-table"/>.
   </para>
  </note>

 </sect1>


 <sect1 id="catalog-pg-amop">
  <title><structname>pg_amop</structname></title>

  <indexterm zone="catalog-pg-amop">
   <primary>pg_amop</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_amop</structname> stores information about
   operators associated with access method operator families.  There is one
   row for each operator that is a member of an operator family.  A family
   member can be either a <firstterm>search</firstterm> operator or an
   <firstterm>ordering</firstterm> operator.  An operator
   can appear in more than one family, but cannot appear in more than one
   search position nor more than one ordering position within a family.
   (It is allowed, though unlikely, for an operator to be used for both
   search and ordering purposes.)
  </para>

  <table>
   <title><structname>pg_amop</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>

Title: pg_am Catalog Columns and Introduction to pg_amop
Summary
This section provides the details of the pg_am catalog columns: oid (row identifier), amname (name of the access method), amhandler (OID of the handler function), and amtype (type of access method: table or index). It notes changes in PostgreSQL 9.6 regarding index access method properties. Additionally, it introduces the pg_amop catalog, which stores information about operators associated with access method operator families.