From: Regina Obe Date: Mon, 12 Dec 2011 02:20:04 +0000 (+0000) Subject: #1366 -- don't rely on state field being capitalized. X-Git-Tag: 2.0.0alpha1~518 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5eb64abbaf17e93f5ab5c9c3ec37225e0683c2ce;p=postgis #1366 -- don't rely on state field being capitalized. git-svn-id: http://svn.osgeo.org/postgis/trunk@8355 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql b/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql index b31cce6e7..9357d068b 100644 --- a/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql +++ b/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql @@ -30,7 +30,7 @@ BEGIN var_na_road := normalize_address('0 ' || roadway1 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip); var_na_inter1 := normalize_address('0 ' || roadway2 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip); END IF; - in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = in_state; + in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = upper(in_state); IF COALESCE(in_zip,'') > '' THEN -- limit search to 2 plus or minus the input zip var_zip := zip_range(in_zip, -2,2); END IF;