Home Explore Blog CI



postgresql

50th chunk of `doc/src/sgml/system-views.sgml`
4d9e412f5c60501c9a437ba4cae374708df7c4fdd87ee9f70000000100000fa3
 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">
       <structfield>statistics_name</structfield> <type>name</type>
       (references <link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>.<structfield>stxname</structfield>)
      </para>
      <para>
       Name of extended statistics object
      </para></entry>
     </row>

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

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>attnames</structfield> <type>name[]</type>
       (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attname</structfield>)
      </para>
      <para>
       Names of the columns included in the extended statistics object
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>exprs</structfield> <type>text[]</type>
      </para>
      <para>
       Expressions included in the extended statistics object
      </para></entry>
      </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>kinds</structfield> <type>char[]</type>
      </para>
      <para>
       Types of extended statistics object enabled for this record
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>inherited</structfield> <type>bool</type>
       (references <link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>.<structfield>stxdinherit</structfield>)
      </para>
      <para>
       If true, the stats include values from child tables, not just the
       values in the specified relation
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>n_distinct</structfield> <type>pg_ndistinct</type>
      </para>
      <para>
       N-distinct counts for combinations of column values. If greater
       than zero, the estimated number of distinct values in the combination.
       If less than zero, the negative of the number of distinct values divided
       by the number of rows.
       (The negated form is used when <command>ANALYZE</command> believes that
       the number of distinct values is likely to increase as the table grows;
       the positive form is used when the column seems to have a fixed number
       of possible values.)  For example, -1 indicates a unique combination of
       columns in which the number

Title: pg_stats_ext View Columns
Summary
The pg_stats_ext view in PostgreSQL contains various columns providing information about extended statistics objects, including schema and table names, owner, column names, expressions, types of statistics, inheritance, and N-distinct counts for combinations of column values, allowing users to access detailed information about extended statistics objects in their database.