Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve notice message when unable to compute stats #364

Closed
wants to merge 2 commits into from

Conversation

@Algunenano
Copy link
Member

commented Jan 21, 2019

Trac issue: https://trac.osgeo.org/postgis/ticket/4272

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) 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

@Komzpa Komzpa self-requested a review Jan 21, 2019

@Komzpa
Komzpa approved these changes Jan 21, 2019

@strk strk closed this in f31dde0 Jan 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.