diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-08 15:02:57 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-08 15:02:57 -0400 |
commit | 935e77d527a018b652f247c7374c558871210db6 (patch) | |
tree | a360b06cb0022d53f4b9a7a87cbc426561ab74f6 /src/include | |
parent | 2d5e7b4a912d55d90c01732d318b94e4ae47027b (diff) |
Further patch rangetypes_selfuncs.c's statistics slot management.
Values in a STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM slot are float8,
not of the type of the column the statistics are for.
This bug is at least partly the fault of sloppy specification comments
for get_attstatsslot()/free_attstatsslot(): the type OID they want is that
of the stavalues entries, not of the underlying column. (I double-checked
other callers and they seem to get this right.) Adjust the comments to be
more correct.
Per buildfarm.
Security: CVE-2017-7484
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/pg_statistic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index c1a624d979a..ec85702a29d 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -275,7 +275,7 @@ typedef FormData_pg_statistic *Form_pg_statistic; * fraction of empty ranges. stavalues is a histogram of non-empty lengths, in * 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 stores as float8s, as measured by the + * equal population. The lengths are stored as float8s, as measured by the * range type's subdiff function. Only non-null rows are considered. */ #define STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM 6 |