From: Regina Obe Date: Sat, 9 Jul 2011 20:12:42 +0000 (+0000) Subject: fix type in county load X-Git-Tag: 2.0.0alpha1~1217 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfcb16259b9801c01487a60b69865eb6e4e622cd;p=postgis fix type in county load git-svn-id: http://svn.osgeo.org/postgis/trunk@7625 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/extras/tiger_geocoder/tiger_2010/tiger_loader.sql b/extras/tiger_geocoder/tiger_2010/tiger_loader.sql index cc50644e2..0947be4dd 100644 --- a/extras/tiger_geocoder/tiger_2010/tiger_loader.sql +++ b/extras/tiger_geocoder/tiger_2010/tiger_loader.sql @@ -120,7 +120,7 @@ COMMENT ON COLUMN loader_lookuptables.columns_exclude IS 'List of columns to exc INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, pre_load_process, post_load_process) VALUES(2, 'county', 'county10', true, false, true, false, '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid) ) INHERITS(county); " ', - '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO cntyidfp; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT uidx_${state_abbrev}_${lookup_name}_cntyidfp UNIQUE (cntyidfp);" + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${lookup_name} RENAME geoid10 TO cntyidfp; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT uidx_${state_abbrev}_${lookup_name}_cntyidfp UNIQUE (cntyidfp);" ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);" ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_county_lookup ( CONSTRAINT pk_${state_abbrev}_county_lookup PRIMARY KEY (st_code, co_code)) INHERITS (county_lookup);"