mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Doc: improve docs about pg_statistic_ext_data.
Commit aa087ec64 was a bit over-hasty about the doc changes needed while splitting pg_statistic_ext_data off from pg_statistic_ext. It duplicated one para and inserted another in what seems to me to be the wrong section. Fix that up, and in passing do some minor copy-editing. Per report from noborusai. Discussion: https://postgr.es/m/CAAM3qnLXLUz4mOBkqa8jxigpKhKNxzSuvwpjvCRPvO5EqWjxSg@mail.gmail.com
This commit is contained in:
parent
ac12ab06a9
commit
732457b5d2
@ -6376,28 +6376,6 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
|||||||
about those tables that are readable by the current user.
|
about those tables that are readable by the current user.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
<structname>pg_statistic</structname> should not be readable by the
|
|
||||||
public, since even statistical information about a table's contents
|
|
||||||
might be considered sensitive. (Example: minimum and maximum values
|
|
||||||
of a salary column might be quite interesting.)
|
|
||||||
<link linkend="view-pg-stats"><structname>pg_stats</structname></link>
|
|
||||||
is a publicly readable view on
|
|
||||||
<structname>pg_statistic</structname> that only exposes information
|
|
||||||
about those tables that are readable by the current user.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Similarly, <structname>pg_statistic_ext_data</structname> should not be
|
|
||||||
readable by the public, since the contents might be considered sensitive.
|
|
||||||
(Example: most common combination of values in columns might be quite
|
|
||||||
interesting.)
|
|
||||||
<link linkend="view-pg-stats-ext"><structname>pg_stats_ext</structname></link>
|
|
||||||
is a publicly readable view on <structname>pg_statistic_ext_data</structname>
|
|
||||||
(after joining with <structname>pg_statistic_ext</structname>) that only exposes
|
|
||||||
information about those tables and columns that are readable by the current user.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<title><structname>pg_statistic</structname> Columns</title>
|
<title><structname>pg_statistic</structname> Columns</title>
|
||||||
|
|
||||||
@ -6616,9 +6594,11 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <structfield>stxkind</structfield> field is filled at creation of the
|
The <structname>pg_statistic_ext</structname> entry is filled in
|
||||||
statistics object, indicating which statistic type(s) are desired. The
|
completely during <command>CREATE STATISTICS</command>, but the actual
|
||||||
statistics (once computed by <command>ANALYZE</command>) are stored in
|
statistical values are not computed then.
|
||||||
|
Subsequent <command>ANALYZE</command> commands compute the desired values
|
||||||
|
and populate an entry in the
|
||||||
<link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>
|
<link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>
|
||||||
catalog.
|
catalog.
|
||||||
</para>
|
</para>
|
||||||
@ -6638,6 +6618,20 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
|||||||
created with <xref linkend="sql-createstatistics"/>.
|
created with <xref linkend="sql-createstatistics"/>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Like <structname>pg_statistic</structname>,
|
||||||
|
<structname>pg_statistic_ext_data</structname> should not be
|
||||||
|
readable by the public, since the contents might be considered sensitive.
|
||||||
|
(Example: most common combinations of values in columns might be quite
|
||||||
|
interesting.)
|
||||||
|
<link linkend="view-pg-stats-ext"><structname>pg_stats_ext</structname></link>
|
||||||
|
is a publicly readable view
|
||||||
|
on <structname>pg_statistic_ext_data</structname> (after joining
|
||||||
|
with <structname>pg_statistic_ext</structname>) that only exposes
|
||||||
|
information about those tables and columns that are readable by the
|
||||||
|
current user.
|
||||||
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<title><structname>pg_statistic_ext_data</structname> Columns</title>
|
<title><structname>pg_statistic_ext_data</structname> Columns</title>
|
||||||
|
|
||||||
@ -6657,7 +6651,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
|||||||
<entry><structfield>stxoid</structfield></entry>
|
<entry><structfield>stxoid</structfield></entry>
|
||||||
<entry><type>oid</type></entry>
|
<entry><type>oid</type></entry>
|
||||||
<entry><literal><link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>.oid</literal></entry>
|
<entry><literal><link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>.oid</literal></entry>
|
||||||
<entry>Extended statistic containing the definition for this data.</entry>
|
<entry>Extended statistic object containing the definition for this data</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
@ -6685,7 +6679,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
|||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>
|
<entry>
|
||||||
MCV (most-common values) list statistics, serialized as
|
MCV (most-common values) list statistics, serialized as
|
||||||
<structname>pg_mcv_list</structname> type.
|
<structname>pg_mcv_list</structname> type
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user