Home Explore Blog CI



postgresql

86th chunk of `doc/src/sgml/catalogs.sgml`
05877019b3009843d4d218edff98d14fdc5a9d41881964c20000000100000fa3
 there is only one
   copy of <structname>pg_shseclabel</structname> per cluster, not
   one per database.
  </para>

  <table>
   <title><structname>pg_shseclabel</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>objoid</structfield> <type>oid</type>
       (references any OID column)
      </para>
      <para>
       The OID of the object this security label pertains to
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>classoid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the system catalog this object appears in
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>provider</structfield> <type>text</type>
      </para>
      <para>
       The label provider associated with this label.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>label</structfield> <type>text</type>
      </para>
      <para>
       The security label applied to this object.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

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

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

  <para>
   The catalog <structname>pg_statistic</structname> stores
   statistical data about the contents of the database.  Entries are
   created by <link linkend="sql-analyze"><command>ANALYZE</command></link>
   and subsequently used by the query planner.  Note that all the
   statistical data is inherently approximate, even assuming that it
   is up-to-date.
  </para>

  <para>
   Normally there is one entry, with <structfield>stainherit</structfield> =
   <literal>false</literal>, for each table column that has been analyzed.
   If the table has inheritance children or partitions, a second entry with
   <structfield>stainherit</structfield> = <literal>true</literal> is also created.  This row
   represents the column's statistics over the inheritance tree, i.e.,
   statistics for the data you'd see with
   <literal>SELECT <replaceable>column</replaceable> FROM <replaceable>table</replaceable>*</literal>,
   whereas the <structfield>stainherit</structfield> = <literal>false</literal> row represents
   the results of
   <literal>SELECT <replaceable>column</replaceable> FROM ONLY <replaceable>table</replaceable></literal>.
  </para>

  <para>
   <structname>pg_statistic</structname> also stores statistical data about
   the values of index expressions.  These are described as if they were
   actual data columns; in particular, <structfield>starelid</structfield>
   references the index.  No entry is made for an ordinary non-expression
   index column, however, since it would be redundant with the entry
   for the underlying table column.  Currently, entries for index expressions
   always have <structfield>stainherit</structfield> = <literal>false</literal>.
  </para>

  <para>
   Since different kinds of statistics might be appropriate for different
   kinds of data, <structname>pg_statistic</structname> is designed not
   to assume very much about what sort of statistics it stores.  Only
   extremely general statistics (such as nullness) are given dedicated
   columns in <structname>pg_statistic</structname>.  Everything else
   is stored in <quote>slots</quote>, which are groups of associated

Title: pg_shseclabel Columns and Introduction to pg_statistic
Summary
This section details the columns of the `pg_shseclabel` catalog: `objoid` (the OID of the security-labeled object), `classoid` (the OID of the system catalog the object is in), `provider` (the label provider), and `label` (the security label). It then introduces the `pg_statistic` catalog, which stores statistical data about database contents for use by the query planner, created by `ANALYZE` command.