Home Explore Blog CI



postgresql

53th chunk of `doc/src/sgml/catalogs.sgml`
d809b66dab362f89d66ae607deb95ac165afe36ce9fbc0420000000100000fa6
 <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 the index can
       only contain one null value in a column).
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisprimary</structfield> <type>bool</type>
      </para>
      <para>
       If true, this index represents the primary key of the table
       (<structfield>indisunique</structfield> should always be true when this is true)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisexclusion</structfield> <type>bool</type>
      </para>
      <para>
       If true, this index supports an exclusion constraint
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indimmediate</structfield> <type>bool</type>
      </para>
      <para>
       If true, the uniqueness check is enforced immediately on
       insertion
       (irrelevant if <structfield>indisunique</structfield> is not true)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisclustered</structfield> <type>bool</type>
      </para>
      <para>
       If true, the table was last clustered on this index
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisvalid</structfield> <type>bool</type>
      </para>
      <para>
       If true, the index is currently valid for queries.  False means the
       index is possibly incomplete: it must still be modified by
       <link linkend="sql-insert"><command>INSERT</command></link>/<link linkend="sql-update"><command>UPDATE</command></link> operations, but it cannot safely
       be used for queries. If it is unique, the uniqueness property is not
       guaranteed true either.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indcheckxmin</structfield> <type>bool</type>
      </para>
      <para>
       If true, queries must not use the index until the <structfield>xmin</structfield>
       of this <structname>pg_index</structname> row is below their <symbol>TransactionXmin</symbol>
       event horizon, because the table may contain broken <link linkend="storage-hot">HOT chains</link> with
       incompatible rows that they can see
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>indisready</structfield> <type>bool</type>
      </para>
      <para>
       If true, the index is currently ready for inserts.  False means the
       index must be ignored by <link linkend="sql-insert"><command>INSERT</command></link>/<link linkend="sql-update"><command>UPDATE</command></link>
       operations.
      </para></entry>
     </row>

Title: pg_index Columns (Continued)
Summary
This section continues detailing the columns of the 'pg_index' catalog table. It describes 'indnkeyatts' (number of key columns, excluding included columns), 'indisunique' (indicates if the index is unique), 'indnullsnotdistinct' (determines if the index considers null values distinct), 'indisprimary' (indicates if the index is a primary key), 'indisexclusion' (indicates if the index supports an exclusion constraint), 'indimmediate' (indicates if the uniqueness check is enforced immediately), 'indisclustered' (indicates if the table was last clustered on this index), 'indisvalid' (indicates if the index is valid for queries), 'indcheckxmin' (indicates if queries must wait for the xmin of this pg_index row to be below their TransactionXmin event horizon), and 'indisready' (indicates if the index is ready for inserts).