Skip to content

Commit 441c8a3

Browse files
committed
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 918eee0 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
1 parent 3558f12 commit 441c8a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/include/catalog/pg_statistic.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum));
152152
* data "kind" will appear in any particular slot. Instead, search the
153153
* stakind fields to see if the desired data is available. (The standard
154154
* function get_attstatsslot() may be used for this.)
155+
*
156+
* Note: The pg_stats view needs to be modified whenever a new slot kind is
157+
* added to core.
155158
*/
156159

157160
/*
@@ -262,7 +265,8 @@ DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum));
262265
* a format similar to STATISTIC_KIND_HISTOGRAM: it contains M (>=2) range
263266
* values that divide the column data values into M-1 bins of approximately
264267
* equal population. The lengths are stored as float8s, as measured by the
265-
* range type's subdiff function. Only non-null rows are considered.
268+
* range type's subdiff function. Only non-null, non-empty rows are
269+
* considered.
266270
*/
267271
#define STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM 6
268272

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy