From e4d050e5f7b2c56ddd7659f843280e2fccb1d3ef Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 6 Oct 2019 14:14:45 -0400 Subject: [PATCH] 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 --- doc/src/sgml/catalogs.sgml | 48 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 5e71a2e865..520d3198b5 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -6376,28 +6376,6 @@ SCRAM-SHA-256$<iteration count>:&l about those tables that are readable by the current user. - - pg_statistic 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.) - pg_stats - is a publicly readable view on - pg_statistic that only exposes information - about those tables that are readable by the current user. - - - - Similarly, pg_statistic_ext_data 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.) - pg_stats_ext - is a publicly readable view on pg_statistic_ext_data - (after joining with pg_statistic_ext) that only exposes - information about those tables and columns that are readable by the current user. - - <structname>pg_statistic</structname> Columns @@ -6616,9 +6594,11 @@ SCRAM-SHA-256$<iteration count>:&l
- The stxkind field is filled at creation of the - statistics object, indicating which statistic type(s) are desired. The - statistics (once computed by ANALYZE) are stored in + The pg_statistic_ext entry is filled in + completely during CREATE STATISTICS, but the actual + statistical values are not computed then. + Subsequent ANALYZE commands compute the desired values + and populate an entry in the pg_statistic_ext_data catalog. @@ -6638,6 +6618,20 @@ SCRAM-SHA-256$<iteration count>:&l created with . + + Like pg_statistic, + pg_statistic_ext_data 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.) + pg_stats_ext + is a publicly readable view + on pg_statistic_ext_data (after joining + with pg_statistic_ext) that only exposes + information about those tables and columns that are readable by the + current user. + + <structname>pg_statistic_ext_data</structname> Columns @@ -6657,7 +6651,7 @@ SCRAM-SHA-256$<iteration count>:&l stxoid oid pg_statistic_ext.oid - Extended statistic containing the definition for this data. + Extended statistic object containing the definition for this data @@ -6685,7 +6679,7 @@ SCRAM-SHA-256$<iteration count>:&l MCV (most-common values) list statistics, serialized as - pg_mcv_list type. + pg_mcv_list type