Home Explore Blog CI



postgresql

89th chunk of `doc/src/sgml/catalogs.sgml`
592ffec4f691b42b08630fbcbe98ff04c37a042922302d510000000100000fe5
 histogram slot for a collatable column would show the collation that
       defines the sort order of the data.  Zero for noncollatable data.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stanumbers<replaceable>N</replaceable></structfield> <type>float4[]</type>
      </para>
      <para>
       Numerical statistics of the appropriate kind for the
       <replaceable>N</replaceable>th <quote>slot</quote>, or null if the slot
       kind does not involve numerical values
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stavalues<replaceable>N</replaceable></structfield> <type>anyarray</type>
      </para>
      <para>
       Column data values of the appropriate kind for the
       <replaceable>N</replaceable>th <quote>slot</quote>, or null if the slot
       kind does not store any data values.  Each array's element
       values are actually of the specific column's data type, or a related
       type such as an array's element type, so there is no way to define
       these columns' type more specifically than <type>anyarray</type>.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>

 <sect1 id="catalog-pg-statistic-ext">
  <title><structname>pg_statistic_ext</structname></title>

  <indexterm zone="catalog-pg-statistic-ext">
   <primary>pg_statistic_ext</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_statistic_ext</structname>
   holds definitions of extended planner statistics.
   Each row in this catalog corresponds to a <firstterm>statistics object</firstterm>
   created with <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>.
  </para>

  <table>
   <title><structname>pg_statistic_ext</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>stxrelid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Table containing the columns described by this object
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stxname</structfield> <type>name</type>
      </para>
      <para>
       Name of the statistics object
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stxnamespace</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the namespace that contains this statistics object
      </para></entry>
     </row>

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

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stxkeys</structfield> <type>int2vector</type>
       (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attnum</structfield>)

Title: pg_statistic Extended Statistics and the pg_statistic_ext Catalog
Summary
This section details the remaining columns of the `pg_statistic` catalog: `stanumbersN` for numerical statistics and `stavaluesN` for column data values within each slot. It then introduces the `pg_statistic_ext` catalog, which stores definitions for extended planner statistics created using `CREATE STATISTICS`. The columns of `pg_statistic_ext` include `oid` (row identifier), `stxrelid` (table OID), `stxname` (statistics object name), `stxnamespace` (namespace OID), `stxowner` (owner OID), and `stxkeys`.