Home Explore Blog CI



postgresql

49th chunk of `doc/src/sgml/system-views.sgml`
f4effb9c04c510061050d3badfb33805cb1518516ccf8e200000000100000fa0
 <type>float4</type>
      </para>
      <para>
       Fraction of column entries whose values are empty ranges.
       (Null for non-range types.)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>range_bounds_histogram</structfield> <type>anyarray</type>
      </para>
      <para>
       A histogram of lower and upper bounds of non-empty and non-null range
       values. (Null for non-range types.)
      </para>
      <para>
       These two histograms are represented as a single array of ranges, whose
       lower bounds represent the histogram of lower bounds, and upper bounds
       represent the histogram of upper bounds.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   The maximum number of entries in the array fields can be controlled on a
   column-by-column basis using the <link linkend="sql-altertable"><command>ALTER
   TABLE SET STATISTICS</command></link>
   command, or globally by setting the
   <xref linkend="guc-default-statistics-target"/> run-time parameter.
  </para>

 </sect1>

 <sect1 id="view-pg-stats-ext">
  <title><structname>pg_stats_ext</structname></title>

  <indexterm zone="view-pg-stats-ext">
   <primary>pg_stats_ext</primary>
  </indexterm>

  <para>
   The view <structname>pg_stats_ext</structname> provides access to
   information about each extended statistics object in the database,
   combining information stored in the <link
   linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>
   and <link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>
   catalogs.  This view allows access only to rows of
   <link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link> and <link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>
   that correspond to tables the user owns, and therefore
   it is safe to allow public read access to this view.
  </para>

  <para>
   <structname>pg_stats_ext</structname> is also designed to present the
   information in a more readable format than the underlying catalogs
   &mdash; at the cost that its schema must be extended whenever new types
   of extended statistics are added to <link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>.
  </para>

  <table>
   <title><structname>pg_stats_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>schemaname</structfield> <type>name</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>nspname</structfield>)
      </para>
      <para>
       Name of schema containing table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tablename</structfield> <type>name</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relname</structfield>)
      </para>
      <para>
       Name of table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>statistics_schemaname</structfield> <type>name</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>nspname</structfield>)
      </para>
      <para>
       Name of schema containing extended statistics object
      </para></entry>
     </row>

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

Title: pg_stats_ext View
Summary
The pg_stats_ext view in PostgreSQL provides information about extended statistics objects in the database, combining data from the pg_statistic_ext and pg_statistic_ext_data catalogs, and presenting it in a more readable format, with columns including schema name, table name, and extended statistics schema name, allowing users to access information about extended statistics objects owned by them.