Skip to content
Snippets Groups Projects
catalogs.sgml 67.55 KiB
<!--
 Documentation of the system catalogs, directed toward PostgreSQL developers
 $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.33 2002/03/07 16:35:32 momjian Exp $
 -->

<chapter id="catalogs">
 <title>System Catalogs</title>

 <sect1 id="catalogs-overview">
  <title>Overview</title>

  <para>
   The system catalogs are the place where a relational database
   management system stores schema metadata, such as information about
   tables and columns, and internal bookkeeping information.
   <productname>PostgreSQL</productname>'s system catalogs are regular
   tables.  You can drop and recreate the tables, add columns, insert
   and update values, and severely mess up your system that way.
   Normally one should not change the system catalogs by hand, there
   are always SQL commands to do that.  (For example, <command>CREATE
   DATABASE</command> inserts a row into the
   <structname>pg_database</structname> catalog -- and actually
   creates the database on disk.)  There are some exceptions for
   esoteric operations, such as adding index access methods.
  </para>

  <table>
   <title>System Catalogs</title>

   <tgroup cols="2">
    <thead>
     <row>
      <entry>Catalog Name</entry>
      <entry>Purpose</entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry>pg_aggregate</entry>
      <entry>aggregate functions</entry>
     </row>

     <row>
      <entry>pg_am</entry>
      <entry>index access methods</entry>
     </row>

     <row>
      <entry>pg_amop</entry>
      <entry>access method operators</entry>
     </row>

     <row>
      <entry>pg_amproc</entry>
      <entry>access method support procedures</entry>
     </row>

     <row>
      <entry>pg_attrdef</entry>
      <entry>column default values</entry>
     </row>

     <row>
      <entry>pg_attribute</entry>
      <entry>table columns (<quote>attributes</quote>, <quote>fields</quote>)</entry>
     </row>

     <row>
      <entry>pg_class</entry>