diff --git a/geocoder/postal-codes/sql/build_data_table.sql b/geocoder/postal-codes/sql/build_data_table.sql index 2b59ddb..ffcb9d0 100644 --- a/geocoder/postal-codes/sql/build_data_table.sql +++ b/geocoder/postal-codes/sql/build_data_table.sql @@ -21,13 +21,11 @@ SELECT the_geom, 'GBR', postalcode FROM uk_postcodes; INSERT INTO postal_code_polygons (the_geom,adm0_a3,postal_code) SELECT the_geom, 'CAN', cfsauid FROM gfsa000a11a_e; - -- Insert Australia zip codes INSERT INTO postal_code_polygons (the_geom,adm0_a3,postal_code) SELECT the_geom, 'AUS', name FROM doc; - -- Insert USA zip codes INSERT INTO postal_code_polygons (the_geom,adm0_a3,postal_code) diff --git a/geocoder/postal-codes/sql/geocoder.sql b/geocoder/postal-codes/sql/geocoder.sql index 78e1f14..4072752 100644 --- a/geocoder/postal-codes/sql/geocoder.sql +++ b/geocoder/postal-codes/sql/geocoder.sql @@ -1,8 +1,6 @@ --SELECT (geocode_postalcode_polygons(Array['10013','G9H','03782'], Array['USA', 'Canada', 'US'])).* - - -CREATE OR REPLACE FUNCTION test_geocode_postalcode_polygons(code text[], inputcountries text[]) +CREATE OR REPLACE FUNCTION geocode_postalcode_polygons(code text[], inputcountries text[]) RETURNS SETOF geocode_namedplace_country_v1 AS $$ DECLARE ret geocode_namedplace_country_v1%rowtype;