]> granicus.if.org Git - postgresql/blobdiff - doc/src/sgml/catalogs.sgml
Trim trailing whitespace
[postgresql] / doc / src / sgml / catalogs.sgml
index 5c1930c745047ebbdbfac4b4aa4e551d11cd6ee5..ea655a10a8992a7b6817ee9f37362c0c35b0db91 100644 (file)
      </row>
 
      <row>
-      <entry><link linkend="catalog-pg-pltemplate"><structname>pg_pltemplate</structname></link></entry>
-      <entry>template data for procedural languages</entry>
+      <entry><link linkend="catalog-pg-partitioned-table"><structname>pg_partitioned_table</structname></link></entry>
+      <entry>information about partition key of tables</entry>
      </row>
 
      <row>
-      <entry><link linkend="catalog-pg-partitioned-table"><structname>pg_partitioned_table</structname></link></entry>
-      <entry>information about partition key of tables</entry>
+      <entry><link linkend="catalog-pg-pltemplate"><structname>pg_pltemplate</structname></link></entry>
+      <entry>template data for procedural languages</entry>
      </row>
 
      <row>
       </entry>
      </row>
 
+     <row>
+      <entry><structfield>attidentity</structfield></entry>
+      <entry><type>char</type></entry>
+      <entry></entry>
+      <entry>
+       If a zero byte (<literal>''</literal>), then not an identity column.
+       Otherwise, <literal>a</literal> = generated
+       always, <literal>d</literal> = generated by default.
+      </entry>
+     </row>
+
      <row>
       <entry><structfield>attisdropped</structfield></entry>
       <entry><type>bool</type></entry>
    32-character hexadecimal MD5 hash. The MD5 hash will be of the user's
    password concatenated to their user name. For example, if user
    <literal>joe</> has password <literal>xyzzy</>, <productname>PostgreSQL</>
-   will store the md5 hash of <literal>xyzzyjoe</>.  If the password is
-   encrypted with SCRAM-SHA-256, it consists of 5 fields separated by colons.
-   The first field is the constant <literal>scram-sha-256</literal>, to
-   identify the password as a SCRAM-SHA-256 verifier. The second field is a
-   salt, Base64-encoded, and the third field is the number of iterations used
-   to generate the password.  The fourth field and fifth field are the stored
-   key and server key, respectively, in hexadecimal format. A password that
-   does not follow either of those formats is assumed to be unencrypted.
+   will store the md5 hash of <literal>xyzzyjoe</>.
+  </para>
+
+  <para>
+   If the password is encrypted with SCRAM-SHA-256, it has the format:
+<synopsis>
+SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</>:<replaceable>&lt;salt&gt;</>$<replaceable>&lt;StoredKey&gt;</>:<replaceable>&lt;ServerKey&gt;</>
+</synopsis>
+   where <replaceable>salt</>, <replaceable>StoredKey</> and
+   <replaceable>ServerKey</> are in Base64 encoded format. This format is
+   the same as that specified by RFC 5803.
+  </para>
+
+  <para>
+    A password that does not follow either of those formats is assumed to be
+    unencrypted.
   </para>
  </sect1>
 
       <entry><literal><link linkend="catalog-pg-collation"><structname>pg_collation</structname></link>.oid</literal></entry>
       <entry>
        For each column in the index key, this contains the OID of the
-       collation to use for the index.
+       collation to use for the index, or zero if the column is not
+       of a collatable data type.
       </entry>
      </row>
 
   </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 extended planner statistics.
-  </para>
-
-  <table>
-   <title><structname>pg_statistic_ext</> Columns</title>
-
-   <tgroup cols="4">
-    <thead>
-     <row>
-      <entry>Name</entry>
-      <entry>Type</entry>
-      <entry>References</entry>
-      <entry>Description</entry>
-     </row>
-    </thead>
-
-    <tbody>
-
-     <row>
-      <entry><structfield>starelid</structfield></entry>
-      <entry><type>oid</type></entry>
-      <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
-      <entry>The table that the described columns belongs to</entry>
-     </row>
-
-     <row>
-      <entry><structfield>staname</structfield></entry>
-      <entry><type>name</type></entry>
-      <entry></entry>
-      <entry>Name of the statistic.</entry>
-     </row>
-
-     <row>
-      <entry><structfield>stanamespace</structfield></entry>
-      <entry><type>oid</type></entry>
-      <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.oid</literal></entry>
-      <entry>
-       The OID of the namespace that contains this statistic
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>staowner</structfield></entry>
-      <entry><type>oid</type></entry>
-      <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
-      <entry>Owner of the statistic</entry>
-     </row>
-
-     <row>
-      <entry><structfield>staenabled</structfield></entry>
-      <entry><type>char[]</type></entry>
-      <entry></entry>
-      <entry>
-        An array with the modes of the enabled statistic types, encoded as
-        <literal>d</literal> for ndistinct coefficients.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>stakeys</structfield></entry>
-      <entry><type>int2vector</type></entry>
-      <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
-      <entry>
-       This is an array of values that indicate which table columns this
-       statistic covers. For example a value of <literal>1 3</literal> would
-       mean that the first and the third table columns make up the statistic key.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>standistinct</structfield></entry>
-      <entry><type>pg_ndistinct</type></entry>
-      <entry></entry>
-      <entry>
-       N-distinct coefficients, serialized as <structname>pg_ndistinct</> type.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>stadependencies</structfield></entry>
-      <entry><type>pg_dependencies</type></entry>
-      <entry></entry>
-      <entry>
-       Functional dependencies, serialized as <structname>pg_dependencies</> type.
-      </entry>
-     </row>
-
-    </tbody>
-   </tgroup>
-  </table>
- </sect1>
 
  <sect1 id="catalog-pg-namespace">
   <title><structname>pg_namespace</structname></title>
  </sect1>
 
 
+ <sect1 id="catalog-pg-partitioned-table">
+  <title><structname>pg_partitioned_table</structname></title>
+
+  <indexterm zone="catalog-pg-partitioned-table">
+   <primary>pg_partitioned_table</primary>
+  </indexterm>
+
+  <para>
+   The catalog <structname>pg_partitioned_table</structname> stores
+   information about how tables are partitioned.
+  </para>
+
+  <table>
+   <title><structname>pg_partitioned_table</> Columns</title>
+
+   <tgroup cols="4">
+    <thead>
+     <row>
+      <entry>Name</entry>
+      <entry>Type</entry>
+      <entry>References</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+
+    <tbody>
+
+     <row>
+      <entry><structfield>partrelid</structfield></entry>
+      <entry><type>oid</type></entry>
+      <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+      <entry>The OID of the <structname>pg_class</> entry for this partitioned table</entry>
+     </row>
+
+     <row>
+      <entry><structfield>partstrat</structfield></entry>
+      <entry><type>char</type></entry>
+      <entry></entry>
+      <entry>
+       Partitioning strategy; <literal>l</> = list partitioned table,
+       <literal>r</> = range partitioned table
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>partnatts</structfield></entry>
+      <entry><type>int2</type></entry>
+      <entry></entry>
+      <entry>The number of columns in partition key</entry>
+     </row>
+
+     <row>
+      <entry><structfield>partattrs</structfield></entry>
+      <entry><type>int2vector</type></entry>
+      <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+      <entry>
+       This is an array of <structfield>partnatts</structfield> values that
+       indicate which table columns are part of the partition key.  For
+       example, a value of <literal>1 3</literal> would mean that the first
+       and the third table columns make up the partition key.  A zero in this
+       array indicates that the corresponding partition key column is an
+       expression, rather than a simple column reference.
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>partclass</structfield></entry>
+      <entry><type>oidvector</type></entry>
+      <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
+      <entry>
+       For each column in the partition key, this contains the OID of the
+       operator class to use.  See
+       <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link> for details.
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>partcollation</structfield></entry>
+      <entry><type>oidvector</type></entry>
+      <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
+      <entry>
+       For each column in the partition key, this contains the OID of the
+       collation to use for partitioning, or zero if the column is not
+       of a collatable data type.
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>partexprs</structfield></entry>
+      <entry><type>pg_node_tree</type></entry>
+      <entry></entry>
+      <entry>
+       Expression trees (in <function>nodeToString()</function>
+       representation) for partition key columns that are not simple column
+       references.  This is a list with one element for each zero
+       entry in <structfield>partattrs</>.  Null if all partition key columns
+       are simple references.
+      </entry>
+     </row>
+
+    </tbody>
+   </tgroup>
+  </table>
+ </sect1>
+
+
  <sect1 id="catalog-pg-pltemplate">
   <title><structname>pg_pltemplate</structname></title>
 
 
  </sect1>
 
- <sect1 id="catalog-pg-partitioned-table">
-  <title><structname>pg_partitioned_table</structname></title>
-
-  <indexterm zone="catalog-pg-partitioned-table">
-   <primary>pg_partitioned_table</primary>
-  </indexterm>
-
-  <para>
-   The catalog <structname>pg_partitioned_table</structname> stores
-   information about how tables are partitioned.
-  </para>
-
-  <table>
-   <title><structname>pg_partitioned_table</> Columns</title>
-
-   <tgroup cols="4">
-    <thead>
-     <row>
-      <entry>Name</entry>
-      <entry>Type</entry>
-      <entry>References</entry>
-      <entry>Description</entry>
-     </row>
-    </thead>
-
-    <tbody>
-
-     <row>
-      <entry><structfield>partrelid</structfield></entry>
-      <entry><type>oid</type></entry>
-      <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
-      <entry>The OID of the <structname>pg_class</> entry for this partitioned table</entry>
-     </row>
-
-     <row>
-      <entry><structfield>partstrat</structfield></entry>
-      <entry><type>char</type></entry>
-      <entry></entry>
-      <entry>
-       Partitioning strategy; <literal>l</> = list partitioned table,
-       <literal>r</> = range partitioned table
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>partnatts</structfield></entry>
-      <entry><type>int2</type></entry>
-      <entry></entry>
-      <entry>The number of columns in partition key</entry>
-     </row>
-
-     <row>
-      <entry><structfield>partattrs</structfield></entry>
-      <entry><type>int2vector</type></entry>
-      <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
-      <entry>
-       This is an array of <structfield>partnatts</structfield> values that
-       indicate which table columns are part of the partition key.  For
-       example, a value of <literal>1 3</literal> would mean that the first
-       and the third table columns make up the partition key.  A zero in this
-       array indicates that the corresponding partition key column is an
-       expression, rather than a simple column reference.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>partclass</structfield></entry>
-      <entry><type>oidvector</type></entry>
-      <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
-      <entry>
-       For each column in the partition key, this contains the OID of the
-       operator class to use.  See
-       <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link> for details.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>partcollation</structfield></entry>
-      <entry><type>oidvector</type></entry>
-      <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
-      <entry>
-       For each column in the partition key, this contains the OID of the
-       the collation to use for partitioning.
-      </entry>
-     </row>
-
-     <row>
-      <entry><structfield>partexprs</structfield></entry>
-      <entry><type>pg_node_tree</type></entry>
-      <entry></entry>
-      <entry>
-       Expression trees (in <function>nodeToString()</function>
-       representation) for partition key columns that are not simple column
-       references.  This is a list with one element for each zero
-       entry in <structfield>partattrs</>.  Null if all partition key columns
-       are simple references.
-      </entry>
-     </row>
-
-    </tbody>
-   </tgroup>
-  </table>
- </sect1>
 
  <sect1 id="catalog-pg-policy">
   <title><structname>pg_policy</structname></title>
 
  </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 extended planner statistics.
+   Each row in this catalog corresponds to a <firstterm>statistics object</>
+   created with <xref linkend="sql-createstatistics">.
+  </para>
+
+  <table>
+   <title><structname>pg_statistic_ext</> Columns</title>
+
+   <tgroup cols="4">
+    <thead>
+     <row>
+      <entry>Name</entry>
+      <entry>Type</entry>
+      <entry>References</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+
+    <tbody>
+
+     <row>
+      <entry><structfield>stxrelid</structfield></entry>
+      <entry><type>oid</type></entry>
+      <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+      <entry>Table containing the columns described by this object</entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxname</structfield></entry>
+      <entry><type>name</type></entry>
+      <entry></entry>
+      <entry>Name of the statistics object</entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxnamespace</structfield></entry>
+      <entry><type>oid</type></entry>
+      <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.oid</literal></entry>
+      <entry>
+       The OID of the namespace that contains this statistics object
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxowner</structfield></entry>
+      <entry><type>oid</type></entry>
+      <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+      <entry>Owner of the statistics object</entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxkeys</structfield></entry>
+      <entry><type>int2vector</type></entry>
+      <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+      <entry>
+       An array of attribute numbers, indicating which table columns are
+       covered by this statistics object;
+       for example a value of <literal>1 3</literal> would
+       mean that the first and the third table columns are covered
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxkind</structfield></entry>
+      <entry><type>char[]</type></entry>
+      <entry></entry>
+      <entry>
+        An array containing codes for the enabled statistic types;
+        valid values are:
+        <literal>d</literal> for n-distinct statistics,
+        <literal>f</literal> for functional dependency statistics
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxndistinct</structfield></entry>
+      <entry><type>pg_ndistinct</type></entry>
+      <entry></entry>
+      <entry>
+       N-distinct counts, serialized as <structname>pg_ndistinct</> type
+      </entry>
+     </row>
+
+     <row>
+      <entry><structfield>stxdependencies</structfield></entry>
+      <entry><type>pg_dependencies</type></entry>
+      <entry></entry>
+      <entry>
+       Functional dependency statistics, serialized
+       as <structname>pg_dependencies</> type
+      </entry>
+     </row>
+
+    </tbody>
+   </tgroup>
+  </table>
+
+  <para>
+   The <structfield>stxkind</structfield> field is filled at creation of the
+   statistics object, indicating which statistic type(s) are desired.
+   The fields after it are initially NULL and are filled only when the
+   corresponding statistic has been computed by <command>ANALYZE</>.
+  </para>
+ </sect1>
+
  <sect1 id="catalog-pg-subscription">
   <title><structname>pg_subscription</structname></title>
 
       <entry>If true, the subscription is enabled and should be replicating.</entry>
      </row>
 
+     <row>
+      <entry><structfield>subsynccommit</structfield></entry>
+      <entry><type>text</type></entry>
+      <entry></entry>
+      <entry>
+       Contains the value of the <varname>synchronous_commit</varname>
+       setting for the subscription workers.
+      </entry>
+     </row>
+
      <row>
       <entry><structfield>subconninfo</structfield></entry>
       <entry><type>text</type></entry>
   <para>
    This catalog only contains tables known to the subscription after running
    either <command>CREATE SUBSCRIPTION</command> or
-   <command>ALTER SUBSCRIPTION ... REFRESH</command>.
+   <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command>.
   </para>
 
   <table>
@@ -11053,8 +11100,11 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
       <entry></entry>
       <entry>
        User mapping specific options, as <quote>keyword=value</>
-       strings, if the current user is the owner of the foreign
-       server, else null
+       strings.  This column will show as null unless the current user
+       is the user being mapped, or the mapping is for
+       <literal>PUBLIC</literal> and the current user is the server
+       owner, or the current user is a superuser.  The intent is
+       to protect password information stored as user mapping option.
       </entry>
      </row>
     </tbody>