pgsql: Further patch rangetypes_selfuncs.c's statistics slot management

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Further patch rangetypes_selfuncs.c's statistics slot management
Date: 2017-05-08 19:03:28
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/935e77d527a018b652f247c7374c558871210db6

Modified Files
--------------
src/backend/utils/adt/rangetypes_selfuncs.c | 14 ++++++++------
src/backend/utils/cache/lsyscache.c | 11 ++++++-----
src/include/catalog/pg_statistic.h | 2 +-
3 files changed, 15 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-05-08 21:15:55 pgsql: Stamp 9.6.3.
Previous Message Peter Eisentraut 2017-05-08 18:04:25 pgsql: Check connection info string in ALTER SUBSCRIPTION