]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Further patch rangetypes_selfuncs.c's statistics slot management.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2017 19:02:58 +0000 (15:02 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2017 19:02:58 +0000 (15:02 -0400)
commit417c9ce2695ec0f716eeff30013979587313bdc1
tree51abaa829e60eae44d7785716f4065ef6e63bfba
parent73b1aee886a211b0438aa3fe4bcded7fd671c1e4
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
src/backend/utils/adt/rangetypes_selfuncs.c
src/backend/utils/cache/lsyscache.c
src/include/catalog/pg_statistic.h