diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2023-11-27 01:29:56 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2023-11-27 01:32:17 +0200 |
commit | 441c8a31349105590e778fe7dd1db0d0c89299df (patch) | |
tree | 751e44260c863f1cc0544d9f1b1062f78b19fa9f /src | |
parent | 3558f120f8697e63d97145706151778bb176ba7b (diff) | |
download | postgresql-441c8a31349105590e778fe7dd1db0d0c89299df.tar.gz postgresql-441c8a31349105590e778fe7dd1db0d0c89299df.zip |
Update comments for pg_statistic catalog table
Make a reminder that pg_stats view needs to be modified whenever a new slot
kind is added. To prevent situations like 918eee0c49 when pg_stats was
forgotten to be updated.
Also, revise the comment that only non-null, non-empty rows are considered
for the range length histogram.
Discussion: https://postgr.es/m/flat/b67d8b57-9357-7e82-a2e7-f6ce6eaeec67@postgrespro.ru
Author: Egor Rogov, Soumyadeep Chakraborty
Reviewed-by: Tomas Vondra, Justin Pryzby, Jian He
Diffstat (limited to 'src')
-rw-r--r-- | src/include/catalog/pg_statistic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index 0808c5fc893..87f48dc6894 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -152,6 +152,9 @@ DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum)); * data "kind" will appear in any particular slot. Instead, search the * stakind fields to see if the desired data is available. (The standard * function get_attstatsslot() may be used for this.) + * + * Note: The pg_stats view needs to be modified whenever a new slot kind is + * added to core. */ /* @@ -262,7 +265,8 @@ DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum)); * a format similar to STATISTIC_KIND_HISTOGRAM: it contains M (>=2) range * values that divide the column data values into M-1 bins of approximately * equal population. The lengths are stored as float8s, as measured by the - * range type's subdiff function. Only non-null rows are considered. + * range type's subdiff function. Only non-null, non-empty rows are + * considered. */ #define STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM 6 |