Home Explore Blog CI



postgresql

52th chunk of `doc/src/sgml/catalogs.sgml`
1add05e48f9db953889c28415ce4096ef39c58935fb998b80000000100000fa1
 OID of the <link linkend="catalog-pg-class"><structname>pg_class</structname></link> entry for this foreign table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ftserver</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-foreign-server"><structname>pg_foreign_server</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the foreign server for this foreign table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ftoptions</structfield> <type>text[]</type>
      </para>
      <para>
       Foreign table options, as <quote>keyword=value</quote> strings
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>


 <sect1 id="catalog-pg-index">
  <title><structname>pg_index</structname></title>

  <indexterm zone="catalog-pg-index">
   <primary>pg_index</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_index</structname> contains part of the information
   about indexes.  The rest is mostly in
   <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.
  </para>

  <table>
   <title><structname>pg_index</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>indexrelid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the <link linkend="catalog-pg-class"><structname>pg_class</structname></link> entry for this index
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indrelid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the <link linkend="catalog-pg-class"><structname>pg_class</structname></link> entry for the table this index is for
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indnatts</structfield> <type>int2</type>
      </para>
      <para>
       The total number of columns in the index (duplicates
       <literal>pg_class.relnatts</literal>); this number includes both key and included attributes
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indnkeyatts</structfield> <type>int2</type>
      </para>
      <para>
       The number of <firstterm>key columns</firstterm> in the index,
       not counting any <firstterm>included columns</firstterm>, which are
       merely stored and do not participate in the index semantics
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisunique</structfield> <type>bool</type>
      </para>
      <para>
       If true, this is a unique index
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indnullsnotdistinct</structfield> <type>bool</type>
      </para>
      <para>
       This value is only used for unique indexes.  If false, this unique
       index will consider null values distinct (so the index can contain
       multiple null values in a column, the default PostgreSQL behavior).  If
       it is true, it will consider null values to be equal (so

Title: pg_foreign_table Columns and pg_index Catalog
Summary
This section continues the description of the pg_foreign_table catalog, specifically outlining the 'ftrelid' (OID of the pg_class entry for the foreign table), 'ftserver' (OID of the foreign server for the table), and 'ftoptions' (foreign table options) columns. It then introduces the pg_index catalog, which stores index-related information, complementing the data in pg_class. The section details the columns of pg_index, including 'indexrelid' (OID of the pg_class entry for the index), 'indrelid' (OID of the pg_class entry for the table the index is for), 'indnatts' (total number of columns in the index), 'indnkeyatts' (number of key columns), 'indisunique' (indicates if the index is unique), and 'indnullsnotdistinct'.