Home Explore Blog CI



postgresql

61th chunk of `doc/src/sgml/catalogs.sgml`
f215f1c853833062f2c806a21b754d607c164a61a8923f600000000100000fa5
 namespace
   can have a separate collection of relations, types, etc. without name
   conflicts.
  </para>

  <table>
   <title><structname>pg_namespace</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>nspname</structfield> <type>name</type>
      </para>
      <para>
       Name of the namespace
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>nspowner</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Owner of the namespace
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>nspacl</structfield> <type>aclitem[]</type>
      </para>
      <para>
       Access privileges; see <xref linkend="ddl-priv"/> for details
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>


 <sect1 id="catalog-pg-opclass">
  <title><structname>pg_opclass</structname></title>

  <indexterm zone="catalog-pg-opclass">
   <primary>pg_opclass</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_opclass</structname> defines
   index access method operator classes.  Each operator class defines
   semantics for index columns of a particular data type and a particular
   index access method.  An operator class essentially specifies that a
   particular operator family is applicable to a particular indexable column
   data type.  The set of operators from the family that are actually usable
   with the indexed column are whichever ones accept the column's data type
   as their left-hand input.
  </para>

  <para>
   Operator classes are described at length in <xref linkend="xindex"/>.
  </para>

  <table>
   <title><structname>pg_opclass</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>opcmethod</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-am"><structname>pg_am</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Index access method operator class is for
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>opcname</structfield> <type>name</type>
      </para>
      <para>
       Name of this operator class
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>opcnamespace</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Namespace of this operator class
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">

Title: pg_namespace Details and pg_opclass
Summary
This section details the `pg_namespace` catalog, which stores namespaces, the underlying structure for SQL schemas. It outlines the columns: `oid` (row identifier), `nspname` (name of the namespace), `nspowner` (owner of the namespace), and `nspacl` (access privileges). It then introduces `pg_opclass`, which defines index access method operator classes, specifying semantics for index columns and data types. It references documentation on operator classes and describes the `pg_opclass` columns.