[postgis-tickets] r14847 - Minor cleanup of last commit and also more schema qualifying
Regina Obe
lr at pcorp.us
Sun Apr 17 13:30:29 PDT 2016
Author: robe
Date: 2016-04-17 13:30:29 -0700 (Sun, 17 Apr 2016)
New Revision: 14847
Modified:
trunk/extras/tiger_geocoder/geocode/geocode_intersection.sql
Log:
Minor cleanup of last commit and also more schema qualifying
references #3530 #3421 for postgis 2.3 (trunk)
Modified: trunk/extras/tiger_geocoder/geocode/geocode_intersection.sql
===================================================================
--- trunk/extras/tiger_geocoder/geocode/geocode_intersection.sql 2016-04-17 20:19:00 UTC (rev 14846)
+++ trunk/extras/tiger_geocoder/geocode/geocode_intersection.sql 2016-04-17 20:30:29 UTC (rev 14847)
@@ -19,7 +19,7 @@
OUT geomout geometry,
OUT rating integer)
RETURNS SETOF record AS
-$BODY$
+$$
DECLARE
var_na_road norm_addy;
var_na_inter1 norm_addy;
@@ -67,7 +67,7 @@
FROM (SELECT * FROM tiger.featnames
WHERE statefp = $1 AND ( lower(name) = $4 ' ||
CASE WHEN length(var_na_inter1.streetName) > 5 THEN ' or lower(fullname) LIKE $7 || ''%'' ' ELSE '' END || ')'
- || ' ) AS f LEFT JOIN (SELECT * FROM addr WHERE addr.statefp = $1) AS addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp)
+ || ' ) AS f LEFT JOIN (SELECT * FROM tiger.addr As addr WHERE addr.statefp = $1) AS addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp)
WHERE $5::text[] IS NULL OR addr.zip = ANY($5::text[]) or addr.zip IS NULL
ORDER BY CASE WHEN lower(f.fullname) = $7 THEN 0 ELSE 1 END
LIMIT 50000
@@ -148,7 +148,7 @@
END LOOP;
RETURN;
END;
-$BODY$
+$$
LANGUAGE plpgsql IMMUTABLE
COST 1000
ROWS 10;
More information about the postgis-tickets
mailing list