[postgis-tickets] r17826 - Fix issue with loading tabblock

Regina Obe lr at pcorp.us
Fri Sep 27 07:56:49 PDT 2019


Author: robe
Date: 2019-09-27 19:56:49 -0700 (Fri, 27 Sep 2019)
New Revision: 17826

Modified:
   branches/2.5/NEWS
   branches/2.5/extras/tiger_geocoder/tiger_loader_2017.sql
Log:
Fix issue with loading tabblock
Closes #4338 for PostGIS 2.5.4

Modified: branches/2.5/NEWS
===================================================================
--- branches/2.5/NEWS	2019-09-28 02:52:11 UTC (rev 17825)
+++ branches/2.5/NEWS	2019-09-28 02:56:49 UTC (rev 17826)
@@ -1,5 +1,5 @@
 PostGIS 2.5.4
-XXXX/XX/XX
+2019/XX/XX
 
  * Bug fixes *
 
@@ -12,6 +12,7 @@
   - #4495, Fix ST_SnapToGrid output having an outdated bbox (Raúl Marín)
   - #4496, Make ST_Simplify(TRIANGLE) collapse if requested (Raúl Marín)
   - #4506, Remove tolerance in point-in-ring tests (Paul Ramsey)
+  - #4338, Fix Census block level data (tabblock table) loading (Regina Obe)
 
 
 PostGIS 2.5.3

Modified: branches/2.5/extras/tiger_geocoder/tiger_loader_2017.sql
===================================================================
--- branches/2.5/extras/tiger_geocoder/tiger_loader_2017.sql	2019-09-28 02:52:11 UTC (rev 17825)
+++ branches/2.5/extras/tiger_geocoder/tiger_loader_2017.sql	2019-09-28 02:56:49 UTC (rev 17826)
@@ -262,7 +262,7 @@
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(11, 'tabblock', 'tabblock10', false, false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tabblock_id)) INHERITS(tiger.${lookup_name});" ',
-'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${lookup_name} RENAME geoid10 TO tabblock_id;  SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); "
+'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO tabblock_id;  SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); "
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${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 "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]);



More information about the postgis-tickets mailing list