The bug was introduced with previous commit, see #2269
As part of this fix, the stawidth field of pg_statistics is
changed to represent the average _compressed_ size rather
than the average _uncompressed_ size of non-null geometry
values. This may have some consequence on the planner (not
known at time of commit).
git-svn-id: http://svn.osgeo.org/postgis/trunk@11276
b70326c6-7e19-0410-871a-
916f4a2858ee
for (i=0; i<samplerows; i++)
{
Datum datum;
- GSERIALIZED *geom;
GBOX box;
datum = fetchfunc(stats, i, &isnull);
continue;
}
+ /** NOTE: we use the toasted width for stawidth */
+ total_width += VARSIZE_ANY(DatumGetPointer(datum));
+
if ( LW_FAILURE == gserialized_datum_get_gbox_p(datum, &box) )
{
/* Skip empty geometry */
box.ymin);
}
- /** TODO: ask if we need geom or bvol size for stawidth */
- total_width += VARSIZE(geom);
total_boxes_area += (box.xmax-box.xmin)*(box.ymax-box.ymin);
/*