Improve histogram-filling loop in new compute_array_stats() code.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 4fb694aebc524f2085152d8c98a85e01ef6136f4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-03-04T20:40:16Z
Releases: 9.2.0
Improve histogram-filling loop in new compute_array_stats() code.

Do "frac" arithmetic in int64 to prevent overflow with large statistics
targets, and improve the comments so people have some chance of
understanding how it works.

Alexander Korotkov and Tom Lane

Files

PathChange+/−
src/backend/utils/adt/array_typanalyze.c modified +44 −19