From: Paul Ramsey Date: Tue, 20 Nov 2012 23:47:23 +0000 (+0000) Subject: Better/different error messages in stats interogator X-Git-Tag: 2.1.0beta2~369 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4ff62329b8a3bcf491eab62bed8f254c1ebc51e;p=postgis Better/different error messages in stats interogator git-svn-id: http://svn.osgeo.org/postgis/trunk@10726 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geometry_estimate.c b/postgis/geometry_estimate.c index 461ebffee..3fa717ade 100644 --- a/postgis/geometry_estimate.c +++ b/postgis/geometry_estimate.c @@ -629,24 +629,24 @@ Datum _postgis_geometry_sel(PG_FUNCTION_ARGS) /* Calculate the gbox */ if ( ! gserialized_datum_get_gbox_p(geom_datum, &gbox) ) - elog(ERROR, "Unable to calculate bounding box from geometry"); + elog(ERROR, "unable to calculate bounding box from geometry"); /* Get the attribute number */ att_num = get_attnum(table_oid, att_name); if ( ! att_num ) - elog(ERROR, "Unable to attribute number for attribute '%s'", att_name); + elog(ERROR, "attribute \"%s\" does not exist", att_name); /* First pull the stats tuple */ stats_tuple = SearchSysCache2(STATRELATT, table_oid, att_num); if ( ! stats_tuple ) - elog(ERROR, "Unable to retreive stats tuple for oid(%d) attrnum(%d), run ANALYZE?", table_oid, att_num); + elog(ERROR, "stats for \"%s.%s\" do not exist", get_rel_name(table_oid), att_name); /* Then read the geom status histogram from that */ rv = get_attstatsslot(stats_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, NULL, &floatptr, &nvalues); if ( ! rv ) { ReleaseSysCache(stats_tuple); - elog(ERROR, "Unable to retreive geomstats, hmmm."); + elog(ERROR, "unable to retreive geomstats, hmmm"); } /* Do the estimation */