[postgis-users] Tiger geocoder - error instead of null when unlocatable

Matthew Syphus MSyphus at lhtac.org
Sat Feb 6 20:05:44 PST 2016

After following the instructions (several times) and apparently successfully installing tiger geocoder and the tiger data for Idaho, I keep getting an error when the geocoder can't find an address.

With a locatable address it works just fine.
SELECT * FROM geocode('3300 state st, boise, id 83703')

When an address is not locatable, I assume it should return null (and move on to the next in the batch).
Instead, it returns an error:

SELECT * FROM geocode('3300 state st, neverland, id 9876543210')


ERROR:  column co.statefp does not exist
LINE 2: ...cefp = p.placefp)  LEFT JOIN county co ON ('16' = co.statefp...
QUERY:  SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,coalesce(p.name,zip.city,cs.name,co.name),s.stusps,sub.zip)    sub.predirabrv   as fedirp,    sub.fename,    COALESCE(sub.suftypabrv, sub.pretypabrv)   as fetype,    sub.sufdirabrv   as fedirs,    coalesce(p.name,zip.city,cs.name,co.name)::varchar as place,    s.stusps as state,    sub.zip as zip,    interpolate_from_address($1, sub.fromhn,    ...

It doesn't seem to matter which address element causes the problem, the error is the same and it kills the query.  Is there some error handling that is getting missed? The examples I've seen look like it just returns null.  Thank you for any help.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160207/44c58701/attachment.html>

More information about the postgis-users mailing list