[postgis-tickets] [PostGIS] #4272: Improve "unable to compute statistics" notice message

PostGIS trac at osgeo.org
Mon Jan 21 03:40:34 PST 2019


#4272: Improve "unable to compute statistics" notice message
--------------------------+---------------------------
  Reporter:  Algunenano   |      Owner:  Algunenano
      Type:  enhancement  |     Status:  assigned
  Priority:  medium       |  Milestone:  PostGIS 3.0.0
 Component:  postgis      |    Version:  trunk
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by Algunenano):

 Github PR: https://github.com/postgis/postgis/pull/364

 It does 2 things:
 - Outputs table and geometry name when the error occurs.
 - Doesn't call `compute_gserialized_stats_mode` the second time (for N
 dimensions) if the first one (for just 2 dimensions) failed.

 Before:
 {{{
 # analyze;
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 NOTICE:  no non-null/empty features, unable to compute statistics
 ANALYZE
 }}}


 After (as n-d isn't called there are half the log messages):
 {{{
 # analyze;
 NOTICE:  PostGIS: Unable to compute statistics for
 "krakow_final.the_geom": No non-null/empty features
 NOTICE:  PostGIS: Unable to compute statistics for
 "krakow_final.the_geom_webmercator": No non-null/empty features
 NOTICE:  PostGIS: Unable to compute statistics for
 "lion_nyc_streets_lat_lon_enumerated_wkt.the_geom": No non-null/empty
 features
 NOTICE:  PostGIS: Unable to compute statistics for
 "lion_nyc_streets_lat_lon_enumerated_wkt.the_geom_webmercator": No non-
 null/empty features
 ANALYZE
 }}}

 Since I expect that someone might be relying on the log string to not
 change between minor releases I'm not planning on backporting this.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4272#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list