Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 441c8a3

Browse filesBrowse 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
Copy full SHA for 441c8a3

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎src/include/catalog/pg_statistic.h

Copy file name to clipboardExpand all lines: src/include/catalog/pg_statistic.h
+5-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.